[Python-ideas] issubclass(collections.OrderedDict, collections.Sequence)

Ethan Furman ethan at stoneleaf.us
Tue Oct 7 22:16:00 CEST 2014


On 10/07/2014 01:10 PM, Ram Rachum wrote:
>
> On one hand I understand the reasoning of looking for concrete use cases, but on the other hand I think it has its
> drawbacks. There's lots of things, like for example tuple.count, which if I remember correctly was added in a pretty
> late version of Python (2.6 or something) and I needed it in a previous version and it annoyed me that it wasn't there.
> You don't need to wait for someone to say "Hey, I need `tuple.count`", if you have it on `list` then people are probably
> gonna need it on `tuple` at one point or another, so if it's a reasonable feature, I think it's good to provide it early
> to save all that time, because it's obvious there are going to be use cases.

The trouble with obvious is it isn't.  ;)


> Another example is PEP 3155. Instead of waiting for people to get frustrated that they can't pass references to methods
> to `multiprocessing.Process` and then having to wait for Python 3.3 to do that, we could have preempted and implemented
> it before based on common sense (i.e. if I have a method object, it should have information on it telling where to find
> it.)

This why we have a public PEP process, to try and feedback from as many folk as possible.  (see my previous point)


> Of course, this approach has its disadvantages as well, and we always need to be careful when adding anything to Python
> because it's a mostly unreversible process.

Yup -- it's easier to add something once it's known to be needed, than to live with bloat because we added something and 
it turns out nobody uses it, or a better method was found and added, or ...

--
~Ethan~


More information about the Python-ideas mailing list