Serhiy Storchaka added the comment:

We can just remove "if typ is str:" case at all. A general case works for 
strings.

But for performance (this will slowdown Antoine's tests by 15-20%) we should 
left it and may be even extend it to other builtin types:

builtin_type = (str, int, float, NoneType, list, tuple, dict, set, bytes): # or 
may be use a set?
...
    if typ in builtin_type:
        return repr(object), True, False

----------

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

Reply via email to