[Python-Dev] Re: OTish: Define Protocols near consumers [was: Keeping Python a Duck Typed Language.]

2021-04-24 Thread Stephen J. Turnbull
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

[Python-Dev] Re: OTish: Define Protocols near consumers [was: Keeping Python a Duck Typed Language.]

2021-04-23 Thread Paul Moore
On Fri, 23 Apr 2021 at 10:31, Stephen J. Turnbull wrote: > SJIS = 'shift_jisx0213' > > *Now* that is a personal protocol, serving the same function of > telling me "this code deals with a legacy Japanese encoding" and > implementing it behind the scenes. But I don't see how that can be >