R. David Murray added the comment: This indeed looks like a bug to me, but I won't be surprised if Raymond says it was done on purpose. On the other hand originally the binary operator mothods didn't correctly return NotImplemented for non-Counters, so perhaps it is just an oversight.
I'm not sure what the backward compatibility consequences would be of changing it. ---------- nosy: +r.david.murray, rhettinger title: collections.Counter methods return Counter objects -> collections.Counter methods return Counter objects instead of subclass objects _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25535> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com