[issue22801] collections.Counter, when empty, doesn't raise an error with = when other is an incompatible type

2015-03-02 Thread Raymond Hettinger
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

[issue22801] collections.Counter, when empty, doesn't raise an error with = when other is an incompatible type

2015-03-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: patch review - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22801 ___ ___

[issue22801] collections.Counter, when empty, doesn't raise an error with = when other is an incompatible type

2015-03-02 Thread Serhiy Storchaka
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 --

[issue22801] collections.Counter, when empty, doesn't raise an error with = when other is an incompatible type

2014-11-05 Thread Ethan Furman
New submission from Ethan Furman: test script: --- from collections import Counter empty_counter = Counter() counter = Counter('abbc') empty_counter = 5 counter = 5 --- results: ---

[issue22801] collections.Counter, when empty, doesn't raise an error with = when other is an incompatible type

2014-11-05 Thread Ethan Furman
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 ___

[issue22801] collections.Counter, when empty, doesn't raise an error with = when other is an incompatible type

2014-11-05 Thread Ethan Furman
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 ___