OO on python real life tutorial?
Claudio Grondi
claudio.grondi at freenet.de
Fri Sep 1 19:16:49 EDT 2006
filippo wrote:
> thanks Fredrik and Claudio,
>
> probably structured coding paradigm is what I need. Claudio, could you
> explain better your sentence below?
>
> Claudio Grondi ha scritto:
>
>>Python/Tk for it in order to avoid programming in wxPython if not really
>>necessary (wxPython has its strengths with growing project sizes, but
>>yours is still far below the threshold).
I personally don't like wxPython because the way it works is very
counter intuitive for me and appear to me somehow non-Pythonic (I warned
you, I am a bit biased to have something against OO, especially I mean,
that the concept of inheritance produces more confusion than it helps).
You are not in a big project with many programmer who must work together
- in my eyes the only context in which OO starts to make sense. You also
don't need something what Tk does not come with to be forced to switch
to wxPython (e.g. in order to use Scintilla). wxPython is like
programming in Microsoft Visual Basic or Visual C++ : some love it, some
don't. Nothing comes at no cost, so when from the one side you don't
need to care about some portions of code on the other side you loose
insight into them and in case of bad luck you will spend days/weeks on
resolving things and bother much other experts to help you, where in
case of not going into it you were able to resolve your problems yourself.
> I want to switch to wxpython because I don't like Tk too much. It is
> difficult sometimes to have full control of the widgets (i.e. focus
> sequence). Why do you think wxwidget is not suitable for low-medium
> size projects? Could you give me some practical examples of this?
I haven't said, that it is not suitable. Maybe you consider it from this
point of view:
The best programming environment is this one you know best.
You don't like Tk because you have learned about it quirks. So you hope
to escape this using another set of tools coming with a bunch of another
quirks you probably don't know about. If you want to go into the
effort to learn about them anyway, why not? Maybe you have the luck and
don't spend hours/days/weeks on debugging things buried deep in the OO
inheritance stuff and hidden this way from your direct insight? Good luck!
Claudio Grondi
More information about the Python-list
mailing list