public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10794 - main/trunk/pym/portage/cache
@ 2008-06-25 22:49 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-25 22:49 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-06-25 22:49:32 +0000 (Wed, 25 Jun 2008)
New Revision: 10794

Modified:
   main/trunk/pym/portage/cache/mappings.py
Log:
Add docstring to slot_dict_class().


Modified: main/trunk/pym/portage/cache/mappings.py
===================================================================
--- main/trunk/pym/portage/cache/mappings.py	2008-06-25 22:39:42 UTC (rev 10793)
+++ main/trunk/pym/portage/cache/mappings.py	2008-06-25 22:49:32 UTC (rev 10794)
@@ -105,6 +105,17 @@
 _slot_dict_classes = weakref.WeakValueDictionary()
 
 def slot_dict_class(keys):
+	"""
+	Generates mapping classes that behave similar to a dict but store values
+	as object attributes that are allocated via __slots__. Instances of these
+	objects have a smaller memory footprint than a normal dict object.
+
+	@param keys: Fixed set of allowed keys
+	@type keys: iterable
+	@rtype: SlotDict
+	@returns: A class that constructs SlotDict instances
+		having the specified keys.
+	"""
 	if isinstance(keys, frozenset):
 		keys_set = keys
 	else:

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-25 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 22:49 [gentoo-commits] portage r10794 - main/trunk/pym/portage/cache Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox