Package conary :: Package build :: Module use :: Class Collection
[hide private]
[frames] | no frames]

Class Collection

source code

object --+    
         |    
      dict --+
             |
            Collection
Known Subclasses:
ArchCollection, CollectionWithFlag, LocalFlagCollection, PackageFlagCollection, PackageFlagPackageCollection, UseCollection

Instance Methods [hide private]
 
__init__(self, name, parent=None, track=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_addAlias(self, realKey, alias)
Add a second way to access the given item.
source code
 
_setAttr(self, name, value)
A generic way to add a temporary attribute to this collection.
source code
 
_delAttr(self, name) source code
 
_getAttr(self, name) source code
 
_addFlag(self, key, *args, **kw) source code
 
__repr__(self)
repr(x)
source code
 
__nonzero__(self) source code
 
_clear(self) source code
 
__getattr__(self, key) source code
 
__getitem__(self, key)
x[y]
source code
 
__setattr__(self, key, value)
x.__setattr__('name', value) <==> x.name = value
source code
 
_getNonExistantKey(self, key)
Method that is called when a nonexistant key is accessed.
source code
 
_iterAll(self) source code
 
_setStrictMode(self, value=True)
Strict mode determines whether you receive an error or an empty flag upon accessing a nonexistant flag
source code
 
_reverseParents(self)
Traverse through the parents from the topmost parent down.
source code
 
_trackUsed(self, value=True) source code
 
_resetUsed(self) source code
 
_getUsed(self) source code
 
_iterUsed(self) source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, parent=None, track=False)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Returns:
new empty dictionary

Overrides: dict.__init__
(inherited documentation)

_addAlias(self, realKey, alias)

source code 
Add a second way to access the given item. Necessary if the actual name for a flag is not a valid python identifier.

_setAttr(self, name, value)

source code 
A generic way to add a temporary attribute to this collection. Attributes stored in this manner will be removed when the collection is cleared, but are not tracked like flags.

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: dict.__repr__
(inherited documentation)

__getitem__(self, key)
(Indexing operator)

source code 
x[y]
Overrides: dict.__getitem__
(inherited documentation)

__setattr__(self, key, value)

source code 
x.__setattr__('name', value) <==> x.name = value
Overrides: object.__setattr__
(inherited documentation)

_getNonExistantKey(self, key)

source code 
Method that is called when a nonexistant key is accessed. Overridden by subclasses to allow for useful error messages or default key values to be supplied