Codebeez zijn wij met zijn allen samen. Wij vormen de cultuur. Op onze eigen manier, die we gezamenlijk bepalen. Alles draait bij Codebeez om onze mensen, hun plezier, hun groei, focus op ons vakgebied en de kwaliteit van wat wij doen. Onze Beez eerst.
This is like Interface in Go (or Java, i don’t speak Java but the article say so).
From what i understand, Protocol is for custom interfaces that you define (this object must have do_x() method), while ABCs are generic (this object is iterable).
From what i understand,
Protocol
is for custom interfaces that you define (this object must havedo_x()
method), while ABCs are generic (this object is iterable).@nikaro iterable means: has __iter__() method. So there's no real difference, as far as I can see.
The difference is that with
Protocol
you can define which method presence you want to ensure. Like i said: custom vs. generic.