musiccomposition at gmail.com
Sat Nov 17 04:48:30 CET 2007
On Nov 15, 7:55 pm, "PeterBrad... at googlemail.com"
<PeterBrad... at googlemail.com> wrote:
> Does anyone know what the state of progress with interfaces for python
> (last I can see ishttp://www.python.org/dev/peps/pep-0245/)
> I would argue that interfaces/(similar feature) are necessary in any
> modern language because they provide a way of separating the
> specification from the implementation of a module.
> I also had a new idea - when specifying the functionality of a module,
> it would be nice to combine examples of valid behaviour / some sort of
> It might therefore be possible to combine unit testing with
> What do you all think?
Python is has duck typing. "If it quacks like a duke, it's duck." That
means that you look for what an object can do and has not what it is.
hasattr and getattr are used more than isinstance.
> (new to python so be nice :)
More information about the Python-list