[issue25535] collections.Counter methods return Counter objects instead of subclass objects

R. David Murray report at bugs.python.org
Mon Nov 2 12:47:36 EST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue25535>
_______________________________________


More information about the Python-bugs-list mailing list