Antoine Pitrou <pit...@free.fr> added the comment: > A possible duck-typing approach here would be to replace the > "instance(x, str)" tests with "hasattr(x, 'encode')" checks instead.
Looks more ugly than useful to me. People wanting to emulate str had better subclass it anyway... ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9873> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com