[IPython-dev] App's, Components and refactoring
dsdale24 at gmail.com
Wed Jul 29 16:50:46 EDT 2009
On Wed, Jul 29, 2009 at 3:36 PM, Brian Granger<ellisonbg.net at gmail.com> wrote:
>> > Once you have one of these runtime objects you can do a number of
>> > things:
>> > * read its attributes (rc.prompt_string)
>> > * write its attributes
>> > * setup notifications rc.add_notification('prompt_string', callable) #
>> > callable is called if prompt_string changes.
>> I think you could maybe do all of this with properties. Notifications
>> could be handled with a decorator.
> Yes, properties or descriptors would handle this fine. We need dynamic
> notifications (at runtime) so decorators wont work for this.
I meant that a decorator could be used to provide dynamic
notifications. The decorator might return a callable class that calls
the original method, and then the callable class iterates through the
list of callables that were registered with it using
More information about the IPython-dev