[Python-ideas] Discussion: Duck typing with “concepts”
marko.ristin at gmail.com
Wed Jan 23 02:04:24 EST 2019
As Ivan has mentioned, Protocols already allow for statical type checks:
We didn't need protocols that often at Parquery, maybe half a dozen of
While we didn't use them in Python, we had to use them intensively in Go
where it is a bit of a nightmare. It gives you freedom for cases when your
input arguments are fairly general (e.g., in a public library), but it made
refactoring our _production_ code (i.e. specific in contrast to general)
much harder since you couldn't look up easily which type implements which
"interface" (as protocols are called in Go).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas