class documentation

class IterableAdaptedDataContext(AdaptedDataContext): (source)

View In Hierarchy

An AdaptedDataContext whose iteration includes any key mapped by any NameAdapter to an existing key. This is useful for presenting the user with a list of available names (keys). It is not so useful for obtaining a list of values to be operated on, since any values whose keys are thus remapped would be included more than once. Fixme: This separate subclass may not be necessary. Perhaps these methods could simply be moved into AdaptedDataContext, but for now, to ensure no old code is broken, we keep them separate.

Method keys Return the list of keys available in the adapted context. Does not include any key which is mapped by an adapter to an undefined key (i.e. which would fail as an argument to __getitem__ or return False as an argument to __contains__).

Inherited from AdaptedDataContext:

Method __delitem__ Delete an item out of the context.
Method __getattr__ Undocumented
Method __getitem__ Get the value bound to the variable 'name' from the context.
Method __setitem__ Set the variable 'name' = value in the context.
Method allows Determine whether value is allowed in this context.

Inherited from DataContext (via AdaptedDataContext):

Method __contains__ Undocumented
Method __eq__ Don't allow objects of different classes to be equal.
Method __iter__ Undocumented
Method __len__ Undocumented
Method __ne__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method checkpoint Make a shallow copy of the context.
Class Variable name Undocumented
Class Variable subcontext Undocumented

Inherited from ListenableMixin (via AdaptedDataContext, DataContext):

Method deferred_events Context manager that sets defer_events to False
Instance Variable defer_events Undocumented
Method _add_deferred_event Defer this event.
Method _defer_events_changed Undocumented
Method _defer_events_changed_refire Undocumented
Method _fire_event Fire an ItemsModifiedEvent.
Class Variable _deferred_events Undocumented

Inherited from PersistableMixin (via AdaptedDataContext, DataContext):

Static Method load Unpickle the context from a file
Method save Pickle the data context out to a file

Inherited from AdapterManagerMixin (via AdaptedDataContext):

Method pop_adapter Remove the 'top' from the top of the adapter stack.
Method push_adapter Add an adapter to the 'top' of the adapter stack.
Method _adapt_getitem Apply adapters in order, calling their adapt_getitem() method.
Method _adapt_name Apply adapters in order, calling their adapt_name method.
Method _adapt_setitem Apply dapters in reverse order, calling their adapt_setitem() method.
def keys(self): (source)

Return the list of keys available in the adapted context. Does not include any key which is mapped by an adapter to an undefined key (i.e. which would fail as an argument to __getitem__ or return False as an argument to __contains__).