Raymond Hettinger added the comment:
I see no reason pure python code to have to detect and report such oddities.
Closing as not worth it.
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
stage: patch review - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22801
___
___
Serhiy Storchaka added the comment:
Additional check is not for free.
$ ./python -m timeit -s from collections import Counter; a = Counter(); b =
Counter(range(10)) -- a = b
Unpatched: 10 loops, best of 3: 8.4 usec per loop
Patched: 10 loops, best of 3: 9.7 usec per loop
--
New submission from Ethan Furman:
test script:
---
from collections import Counter
empty_counter = Counter()
counter = Counter('abbc')
empty_counter = 5
counter = 5
---
results:
---
Changes by Ethan Furman et...@stoneleaf.us:
Removed file: http://bugs.python.org/file37136/issue22778.stoneleaf.01.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22801
___
Changes by Ethan Furman et...@stoneleaf.us:
Added file: http://bugs.python.org/file37137/issue22778.stoneleaf.01.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22801
___