Calvin Spealman wrote:

> I second that removal of callable() would be a bad idea. There are too
> many cases where it is not feasable to "just call the object and catch the
> exception". In the cases where the call would not happen until later than
> the test for callability, it would require then that any state changes
> caused before the call would be reversed if calling the object raised any
> error, and sometimes that is not even possible. Further, it ignores all
> cases where we are simply introspecting and do not want any side effects
> from said introspection.

 +1 on not removing callable().  Given how calling something has potentially
side effects, this is a good example of a situation where 'look before you
leap' is a safer approach, IMHO.  

IPython makes extensive use of callable() to provide some of its
command-line conveniences, and I don't see a clean way to replace it (short
of just adding back a private implementation of what callable does today by
copying out of a 2.x tree into ipython's).

Cheers,

f

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to