Ezio Melotti <ezio.melo...@gmail.com> added the comment:

I'm not sure it's worth bringing callable() back at this point.
It would have made more sense for 3.1, but now we already have 2  
callable()-less versions of Python if we do it for 3.2 (what about the 
moratorium though?) or 3 if we do it for 3.3.  Also if isinstance(obj, 
collections.Callable) is correct in what it does, it's trivial to do something 
like:

def callable(obj):
  return isinstance(obj, collections.Callable)


If it goes in the `iscallable` name suggested on python-dev might be better 
(IMHO).  At least people will realize that it's something "new" and don't 
assume that the old callable() has been there all the time (it also clear that 
it returns a boolean and reads better in e.g. `if iscallable(obj): ...`).
(The patch should also include an entry in the table at the top of 
functions.rst now that I committed #10299 in r86732.)

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to