Paul Moore writes:

 > What you're missing, I think, is that we're talking about
 > typing.Protocol - see here:
 > https://docs.python.org/3/library/typing.html#typing.Protocol

I understand that we're talking about typing.  What I don't understand
is how any general facility provided in a standard library can be
"defined close to the consumer".  By definition, these facilities are
far from the provider, since they're abstract (whether they're defined
ABCs, "small" protocols, or duck typing).

The point of my example is that indeed, my tiny "SJIS protocol"
*arose* near the original consumer, but it was refined and is now
*defined* "far" from any consumer.  (The fact that it's self-
providing is an accident of the fact that it's a concrete protocol.)
I think that this is a useful process for software development (ie,
design APIs from the point of view of the consumers and then make sure
the backends provide them) but I don't see how this applies to
structuring the Python stdlib or typing.*.

Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WT5JCNKYWTXWDR3CA3UYJ4XY5AVJWJU3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to