pyre.traits.Dict¶
Module Contents¶
-
class
pyre.traits.Dict.Dict(schema=Property.identity(), default=object, **kwds)¶ Bases:
pyre.traits.Slotted.SlottedA property that maps strings to components
-
typename= dict¶
-
native(self, value, **kwds)¶ The default strategy for handling macros in slot values
-
process(self, value, **kwds)¶ Walk {value} through the casting procedure appropriate for clients that are component classes
-
instantiate(self, value, **kwds)¶ Walk {value} through the casting procedure appropriate for clients that are component instances
-
classConfigured(self, component, **kwds)¶ Notification that the client class record has been configured
-
instanceConfigured(self, instance, **kwds)¶ Notification that the client class record has been configured
-
catalog(self, factory, value, node, **kwds)¶ Instantiate and initialize an appropriate map
-
configureClient(self, client, myFactory, traitFactory)¶ A named client with public inventory requires further configuration
-
-
class
pyre.traits.Dict.Map(schema, factory, *args, **kwds)¶ Bases:
collections.abc.MutableMapping,pyre.framework.Dashboard.DashboardThe base class for the storage helpers
-
schema¶
-
factory¶
-
map¶
-
__delitem__(self, name)¶ Remove {name} from my map
-
__iter__(self)¶ Create an iterator over my map
-
__len__(self)¶ Compute my size
-
__contains__(self, name)¶ Check whether {name} is in my map
-
__setitem__(self, name, value)¶ Store {value} in the map under {name}
-
__str__(self)¶ Build a simple string representation of my contents
-
-
class
pyre.traits.Dict.KeyMap(key, *args, **kwds)¶ Bases:
pyre.traits.Dict.MapA storage strategy that is appropriate when a client has public inventory
-
__getitem__(self, name)¶ Retrieve the value associated with {name} and convert according to my schema
-
insert(self, name, value, priority, locator)¶ Store {value} in the map under {name}
-
-
class
pyre.traits.Dict.NameMap¶ Bases:
pyre.traits.Dict.MapA storage strategy for nameless clients
-
__getitem__(self, name)¶ Retrieve the value associated with {name} and convert according to my schema
-
insert(self, name, value, **kwds)¶ Build a slot to hold {value} and place it in the map
-