[Python-ideas] Bring back callable()
fuzzyman at gmail.com
Mon Mar 7 21:14:55 CET 2011
On 7 March 2011 20:09, Joao S. O. Bueno <jsbueno at python.org.br> wrote:
> On Mon, Mar 7, 2011 at 2:17 PM, Bill Janssen <janssen at parc.com> wrote:
> > Terry Reedy <tjreedy at udel.edu> wrote:
> >> On 11/23/2010 6:01 PM, Antoine Pitrou wrote:
> >> > The substitute of writing `isinstance(x, collections.Callable)` is
> >> > not good, 1) because it's wordier 2) because collections is really not
> >> > an intuitive place where to look for a Callable ABC.
> >> I thnk it should be in the abc module, along with WeakSet
> > Me too.
Too late. :-)
> I was not around here, and although I looked for, I didn't find this on the
> What was the reasoning for removing "callable" in the first place?
It didn't always do exactly the right thing (but was usually "good enough")
and was thought easy to replace with a more accurate alternative
(isinstance(foo, abc.Callable) I *think*) which proved annoying in pactise.
All the best,
> > Bill
> > _______________________________________________
> > Python-ideas mailing list
> > Python-ideas at python.org
> > http://mail.python.org/mailman/listinfo/python-ideas
> Python-ideas mailing list
> Python-ideas at python.org
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas