Talin wrote:

> (Admittedly this particular case could be done without 'callable', since you
> could test for string type, and assume callable otherwise.

Yes, and that's exactly why it can be made to work
in this particular case. Most likely no testing for
callability is being done, only isinstance(repl, str).

This isn't so bad, because it's pretty rare for
someone to try to create a "string-like" object that
isn't a subclass of str. But callable objects can
be of any class, and such objects are frequently
used.

--
Greg
_______________________________________________
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