Re: [Tutor] style question: when to hide variable, modules

2005-01-18 Thread Paul Tremblay
: when to hide variable, modules A few thoughts: - you might want to make a configuration object that you can pass around, this is probably better than passing around an instance of the main Burn class. I actually pass around many instances. Maybe this is bad programming, but I can't think

Re: [Tutor] style question: when to hide variable, modules

2005-01-18 Thread Kent Johnson
Paul Tremblay wrote: On Fri, Jan 14, 2005 at 08:11:32PM -0500, Kent Johnson wrote: - typical Python style is *not* to define setter and getter functions. If you need to mediate attribute access you can do it later using properties. I treid to figure out how this works with no luck. It seems

Re: [Tutor] style question: when to hide variable, modules

2005-01-18 Thread Max Noel
On Jan 18, 2005, at 22:50, Kent Johnson wrote: Python, instead, lets you change what attribute access means. The way to do this is with 'properties'. This is kind of an advanced topic, here are two references: http://www.python.org/2.2.1/descrintro.html#property

Re: [Tutor] style question: when to hide variable, modules

2005-01-15 Thread Jacob S.
I'm not too sure about this... Couldn't you make that a package? Rename Backup.py to __init__.py Put all of the modules in a folder named Backup in your sys.path - Question: Does it have to be in site-packages? Well, there's my two bits, Jacob During the recent discussion on jython, a poster

Re: [Tutor] style question: when to hide variable, modules

2005-01-14 Thread Kent Johnson
A few thoughts: - you might want to make a configuration object that you can pass around, this is probably better than passing around an instance of the main Burn class. - typical Python style is *not* to define setter and getter functions. If you need to mediate attribute access you can do it