[Tutor] Placing entire Application inside a class
Tiger12506
keridee at jayco.net
Wed Dec 19 05:03:02 CET 2007
It is helpful for GUI applications because of what it says about halfway
down the page, within __init__ you can bind certain messages to methods of
the class.
I would not say that it is recommended persé but I'm sure that there are
those out there that cannot write a program without putting it into a class.
And yet there are those out there who cannot write a program without making
it all functional in nature. Do what feels right to you.
This sort of thing is very popular in C++ because of the way MFC is
structured, but no one here likes MFC right? ;-)
As I said, do what you like, just as long as it doesn't get messy.
----- Original Message -----
From: "Jim Morcombe" <jmorcombe at westnet.com.au>
To: "python tutor mailing list" <tutor at python.org>
Sent: Tuesday, December 18, 2007 8:54 PM
Subject: [Tutor] Placing entire Application inside a class
I have just read through "Creating a GUI in Python - by Dakota Lemaster"
In it, Dakota recomends placing the entire application within a class.
Why is this so? Surely in many cases you end up with a constructor for the
class that is cumbersome and complex?
Is this a recomended Python programming technique?
http://student-iat.ubalt.edu/sde/students/lemaster/COSC330/Final/sec4_AppClass.html
Why is this so? Surely in many cases you end up with a constructor for the
class that is cumbersome and complex?
Is this a recomended Python programming technique?
Jim
--------------------------------------------------------------------------------
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list