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: you want to 
delegate to a callable by calling the instance at the top of the chain, and 
one of the chain members isn't callable.  I don't see a use case for that, 
YAGNI.

I'll defer the Percolator discussion for now.  There is more to it than just 
the inheritance issue.

I found your example1.py to be confusing.  Please stop using the word 
'delegator', it's too overloaded in this discussion!

I marked up example1.py as example1a.py, changing some names and adding some 
comments.

I also worked up example2.py which seems to cover the possible combinations 
of proxying functions, callables, and methods.  It works without adding 
__call__() to Delegator.  Please check it out, what more do you need?

I'll be away until Sunday, so I can't respond further until then.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1252>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to