Hey Chris, My philosophy at the moment is to approach larger Applications and all Gui's using classes. For smaller projects (which typically end up becoming Modules anyway) I use functions. I think the way your Python is written should be driven by the needs of your task at hand. Sometimes you don’t need OOP, it can be kept simple and modular, but still be extensible.
That being said I think OOP can improve most if not all programs when used correctly. With OOP your code can be made more efficient, as well as easier to maintain and update. Most of the Pipeline Engineers I know would probably disagree and say use classes for everything. But Alas... I'm still a TD at heart, with Coder tendencies. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Chris Mills Sent: Tuesday, January 19, 2010 5:43 PM To: [email protected] Subject: [Maya-Python] Class or not? Greetings, In developing Python scripts for Maya I am wondering when is is appropriate to use a set of functions for a script and when it is better form to use a class with methods? Is this a purely semantical difference or are there good arguments for why one should go one approach over another? I am still getting my head around Python and would appreciate hearing your thoughts on this. Kind regards, Chris Lizard Lounge Graphics, LTD. Wellington, NZ http://lizardlounge.com Int'l: +644-977-5400 / +642-174-8770 NZ local: 04-977-5400 / 021-748-770
-- http://groups.google.com/group/python_inside_maya
