Changeset 246
- Timestamp:
- Sat Apr 15 15:27:46 2006
- Files:
-
- trunk/utiltests.py (modified) (diff)
- trunk/xix/utils/mock.py (added)
- trunk/xix/utils/container.py (added)
- trunk/xix/utils/interfaces.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/utiltests.py
r212 r246 12 12 import xix.utils.tools.options 13 13 import xix.utils.tools.parse 14 import xix.utils.container 14 15 from tests import doctests 15 16 … … 28 29 xix.utils.tools.options, 29 30 xix.utils.tools.parse, 31 xix.utils.container, 30 32 doctests.utils.config, 31 33 doctests.utils.python -
trunk/xix/utils/interfaces.py
r182 r246 300 300 """) 301 301 302 ############################################################################### 303 # Container interfaces 304 ############################################################################### 302 305 306 class IContainer(Interface): 307 """A Container is like a dictionary with ordered entries and can be used 308 For representing things such as menus, spriteGroups, etc. 309 """ 310 311 entries = Attribute("""List of (key, value) pairs constituting the Container. 312 """) 313 314 def __setitem__(key, value): 315 """Set item in container refernced by key to value. Dyanmic of initial 316 set is that entry resulting from (key,value) is appended as current last 317 in order of entries. 318 """ 319 320 def __getitem__(value): 321 """Get the item referenced by value. 322 """ 323 324 def __iter__(): 325 """Return iterator over entries in the order they were set. 326 """ 327 328
