Nick Coghlan added the comment:
Did you try moving the existing single-argument fast path to before the main if
statement in _make_key? That is:
if not kwds and len(args) == 1:
key = args[0]
key_type = type(key)
if key_type in fasttypes:
if typed:
return key, key_type
return key
Such a special case is already present, but it's *after* a lot of the other
processing *and* it doesn't fire when typed==True.
So instead of the simple 2-tuple creation above, you instead do the relatively
wasteful:
args + tuple(type(v) for v in args)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16389>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com