Re: [Python-Dev] PEP 544: Protocols

2017-03-21 Thread Matthias Kramm via Python-Dev
On Tue, Mar 21, 2017 at 11:05 AM, Ivan Levkivskyi wrote: > There are two places where PEP draft says: > > "Note that there is no conceptual difference between explicit and implicit > subtypes" > > and > > "The general philosophy is that protocols are mostly like regular ABCs, > but a static type

Re: [Python-Dev] PEP 544: Protocols

2017-03-21 Thread Matthias Kramm via Python-Dev
On Mon, Mar 20, 2017 at 2:42 PM, Ivan Levkivskyi wrote: > 1. Backward compatibility: People are already using ABCs, including > generic ABCs from typing module. > If we prohibit explicit subclassing of these ABCs, then quite a lot of > code will break. > Fair enough. Backwards compatibility is a

Re: [Python-Dev] PEP 544: Protocols

2017-03-20 Thread Matthias Kramm via Python-Dev
I'm a big fan of this. I really want structural subtyping for http://github.com/google/pytype. On Mon, Mar 20, 2017 at 5:00 AM, Ivan Levkivskyi wrote: > Explicitly declaring implementation > --- > > To explicitly declare that a certain class implements the given p