Re: critique my code, please

2006-02-08 Thread Frithiof Andreas Jensen
"Brian Blais" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I am including at the end of this document (is it better as an attachment?) some code > for a small gui dialog. Since I am quite new to this, if anyone has any suggestions > for improvements to the code, bad co

Re: critique my code, please

2006-02-06 Thread Scott David Daniels
Brian Blais asked for suggestions and critiques of his code. For style, look at: http://www.python.org/peps/pep-0008.html This is how I'd rewrite the first class: YESNO = ('No', 'Yes') class SimulationParams(object): '''Simulation Parameters setting up of a simulation'''

Re: critique my code, please

2006-02-06 Thread gry
Just a few suggestions: 1) use consistant formatting, preferably something like: http://www.python.org/peps/pep-0008.html E.g.: yesno = {0:"No", 1:"Yes", True:"Yes", False:"No"} 2) if (isinstance(self.random_seed,str)): s=s+"Random Seed: %s\n" % self.random_seed else:

critique my code, please

2006-02-06 Thread Brian Blais
Hello, I am including at the end of this document (is it better as an attachment?) some code for a small gui dialog. Since I am quite new to this, if anyone has any suggestions for improvements to the code, bad coding practices, poor gui design, etc... I'd love to hear it. This list has been