Am I missing something with Python not having interfaces?
Daniel Marcel Eichler
onsen-neko at gmx.net
Thu May 8 03:05:49 EDT 2008
Am Mittwoch 07 Mai 2008 22:39:30 schrieb Luis Zarrabeitia:
> There you have it, interfaces are not enough to ensure that the
> implementors actually implement the methods. They are useful for
> warning at compile time if there is a missing method, but nothing
> more.
It's not the fault of the enviroment, if the coder is to stupid to use
it the right way.
> I believe you could achieve a very similar warning in python
> using some kind of Interface metaclass (too lazy right now to hack a
> proof of concept, but it looks doable).
Of course. And unlike Javas interfaces, it ensure a more dynamic
coding-style, without great tools which check all the time for correct
behaviour.
More information about the Python-list
mailing list