[issue16832] Expose cache validity checking support in ABCMeta
Antoine Pitrou
report at bugs.python.org
Sat May 25 17:27:04 CEST 2013
Antoine Pitrou added the comment:
Rather than exposing the "cache token" (which looks like an implementation detail), you may allow third-party code to register a handler which will be called when an ABC's registrations are modified:
def abc_handler(abc):
"""
Called when the concrete class registrations for ABC `abc`
are updated.
"""
or even:
def abc_handler(abc, added, removed):
"""
Called when the concrete class registrations for ABC `abc`
are updated. `added` is an iterable of concrete classes which
have been registered on the ABC, `removed` is an iterable of
concrete classes which have been unregistered.
"""
----------
nosy: +pitrou
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16832>
_______________________________________
More information about the Python-bugs-list
mailing list