[issue1252] IDLE - patch Delegator to support callables

2010-07-21 Thread Tal Einat
Tal Einat added the comment: I'm sorry I let this die out. This should stay closed. For the time being I have given up on developing the ShellLogger extension (for the time being) so this change is not needed as far as I am concerned. -- ___ Python

[issue1252] IDLE - patch Delegator to support callables

2008-01-13 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: -- resolution: -> rejected status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing lis

[issue1252] IDLE - patch Delegator to support callables

2007-12-10 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Do you have any further comments on this issue? __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Un

[issue1252] IDLE - patch Delegator to support callables

2007-10-30 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: Added file: http://bugs.python.org/file8669/example2.py __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1252] IDLE - patch Delegator to support callables

2007-10-30 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: Added file: http://bugs.python.org/file8668/example1a.py __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1252] IDLE - patch Delegator to support callables

2007-10-30 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: > 1) Should Delegator delegate calls to callables No, I agree they should. The question is whether it's necessary to add a __call__() method to the Delegator class. I claim you can do what you want to do without it. It serves only one purpose that I can see

[issue1252] IDLE - patch Delegator to support callables

2007-10-30 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Further response to your 27Oct: > That's it. There is more. The Delegator mixin exposes its delegate attribute. Without that, it would not be possible to pass e.g. insert() down the chain because (in the case of the Text percolator) insert() is found in each f

[issue1252] IDLE - patch Delegator to support callables

2007-10-29 Thread Tal Einat
Tal Einat added the comment: I'm trying to keep this as simple as possible, because it seems we're tending to over-complicate. We're discussing two distinct issues: 1) Should Delegator delegate calls to callables 2) Should Percolator inherit from Delegator Have I missed something? Regarding

[issue1252] IDLE - patch Delegator to support callables

2007-10-27 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: I'll respond further shortly. In the meantime, please notice that Delegator3.py works the same whether or not your Delegator.__call__() method is commented out. That's because you needed to define __call__() methods in your filters. We are still suffering from

[issue1252] IDLE - patch Delegator to support callables

2007-10-27 Thread Tal Einat
Tal Einat added the comment: It seems we're looking at Delegators and Percolators from increasingly different points of view. Let's back up a little. I see a Delegator object as a transparent proxy to its "delegate". This means that attribute access is automatically delegated to the delegate, u

[issue1252] IDLE - patch Delegator to support callables

2007-10-27 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: First, I'm changing my mind about Percolator inheriting from Delegator. A Percolator acts as a container for Delegators: it "hasa" (chain) of them. But it fails "isa" Delegator. It has no use for the Delegator's caching, and chaining Percolators doesn't make se

[issue1252] IDLE - patch Delegator to support callables

2007-10-25 Thread Tal Einat
Tal Einat added the comment: I understand your argument, but am not convinced. I'll try to explain how I see this and how I came to this view. I wished to wrap a specific method (or function) instead of wrapping the father object with a Delegator and implementing a single method. But I needed m

[issue1252] IDLE - patch Delegator to support callables

2007-10-24 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Despite your explanation, I don't understand what is being accomplished here. Delegates are not intended to be callable. They have methods, e.g. insert, which are callable, and the insert call is propagated down the chain by calls like (from ColorDelegator):

[issue1252] IDLE - patch Delegator to support callables

2007-10-09 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1252] IDLE - patch Delegator to support callables

2007-10-09 Thread Tal Einat
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 callable. The built-in callable() method will now return True for any Delegator. Before this patch it always returns False,