Package rosh :: Package impl :: Module namespace :: Class ResourceList
[frames] | no frames]

Class ResourceList

source code

object --+
         |
        ResourceList

A ResourceList presents a IPython tab-completable list of resources as if they are attributes. The general form of ResourceList only presents a flat list of resources. For a ResourceList that is namespace-aware, use NSResourceList.

ResourceList can share a config with a Namespace instance, which makes them useful as views against larger pools of resources.

Instance Methods
 
__init__(self, config, resources, resource_class)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
__iter__(self)
Not thread-safe.
source code
 
__getattribute__(self, key)
x.__getattribute__('name') <==> x.name
source code
 
__getitem__(self, key) source code

Inherited from object: __delattr__, __format__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, config, resources, resource_class)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • config - NamespaceConfig instance
  • resource_class (Class) - Class to instantiate to create new resources if resource has not already been created.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__iter__(self)

source code 

Not thread-safe. If ResourceList is modified during iteration, this will fail

__getattribute__(self, key)

source code 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__
(inherited documentation)