OO in Python? ^^

bonono at gmail.com bonono at gmail.com
Sun Dec 11 17:02:22 CET 2005


Ernst Noch wrote:
> Matthias Kaeppler wrote:
> > Brian Beck wrote:
> >
> >> def foo(self):
> >>     raise NotImplementedError("Subclasses must implement foo")
> >
> >
> > That's actually a good idea, though not as nice as a check at
> > "compile-time" (jesus, I'm probably talking in C++ speech again, is
> > there such a thing as compile-time in Python at all?!)
> >
> > Another thing which is really bugging me about this whole dynamically
> > typing thing is that it seems very error prone to me:
> >
> > foo = "some string!"
> >
> > # ...
> >
> > if (something_fubar):
> >    fo = "another string"
> >
> > Oops, the last 'o' slipped, now we have a different object and the
> > interpreter will happily continue executing the flawed program.
> >
> > I really see issues with this, can anyone comment on this who has been
> > working with Python more than just a day (like me)?
> >
> > Regards,
> > Matthias
>
> Matthias,
>
> maybe this article is of interest for you:
> http://www.mindview.net/WebLog/log-0025
>
And two related ones.

http://www.algorithm.com.au/mt/programming_languages/me_on_xoltar_on_static_typing.html

Just follow the links.




More information about the Python-list mailing list