[New-bugs-announce] [issue1252] IDLE - patch Delegator to support callables
report at bugs.python.org
Wed Oct 10 04:06:52 CEST 2007
New submission from Tal Einat:
Add an __call__ magic method to Delegator so that it can delegate to
callables. This will raise the required exception if the delegate isn't
The built-in callable() method will now return True for any Delegator.
Before this patch it always returns False, which is wrong if the
delegate is callable, so callable() doesn't really work on Delegator
instances in both cases. I couldn't see how this could be harmful.
Also make the Delegator class a new-style class.
This patch is required for the Squeezer and ShellLogger IDLE extensions
found on PyPI to be able to co-exist.
nosy: kbk, taleinat
title: IDLE - patch Delegator to support callables
versions: Python 2.5, Python 2.6
Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 639 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071010/7af481a2/attachment.obj
More information about the New-bugs-announce