Re: Programming Idiomatic Code

2007-07-03 Thread Bruno Desthuilliers
Nathan Harmston a écrit : >> > Using a module global for this kind of data is usually a bad idea >> > (except eventually for run-once throw-away scripts, and even then...) >> > >> > Why is this a bad idea? >> >> Don't you have any idea ? > > Not really.problem with access, using unneeded memor

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> "Clipper-derived unreadable drivel" > > I'm intrigued, what language are you working in? > > Clipper v5 was a pretty impressive development language for 1990 - with > code blocks, a flexible pre-processor, garbage collection, exception > handling, decent speed and an API to allow easy integration

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> > Using a module global for this kind of data is usually a bad idea > > (except eventually for run-once throw-away scripts, and even then...) > > > > Why is this a bad idea? > > Don't you have any idea ? > -- Not really.problem with access, using unneeded memory... I grasping at straws here.

Re: Programming Idiomatic Code

2007-07-03 Thread Douglas Woodrow
On Tue, 3 Jul 2007 10:19:07, Nathan Harmston <[EMAIL PROTECTED]> wrote > >i m in the UK and dont have the experience but hey 10 minutes of >programming python beats 12 hours of programming in Clipper-derived >unreadable drivel (you dont know how much I appreciate Python atm). "Clipper-derived unr

Re: Programming Idiomatic Code

2007-07-03 Thread Bruno Desthuilliers
Nathan Harmston a écrit : > HI, (snip) > I have one question though: > > Using a module global for this kind of data is usually a bad idea > (except eventually for run-once throw-away scripts, and even then...) > > Why is this a bad idea? Don't you have any idea ? -- http://mail.python.org/mail

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
HI, Thanks to everyone for your comments ( i never knew "with" existed, but to quote Borat "I like", unfortunately I cant apply for the job as i m in the UK and dont have the experience but hey 10 minutes of programming python beats 12 hours of programming in Clipper-derived unreadable drivel (you

Re: Programming Idiomatic Code

2007-07-03 Thread Bruno Desthuilliers
Nathan Harmston a écrit : > Hi, > > I m sorry but I m bored at work (and no ones looking so I can write > some Python) and following a job advertisement post,I decided to write > the code to do its for the one entitled Ninjas or something like that. > I was wondering what could be done to my follo

Re: Programming Idiomatic Code

2007-07-02 Thread attn . steven . kuo
On Jul 2, 5:22 pm, "Nathan Harmston" <[EMAIL PROTECTED]> wrote: > Hi, > > I m sorry but I m bored at work (and no ones looking so I can write > some Python) and following a job advertisement post,I decided to write > the code to do its for the one entitled Ninjas or something like that. > I was won

Re: Programming Idiomatic Code

2007-07-02 Thread Steve Lianoglou
I don't know about idiomatic, but here's a quick list of somethings I'd change. 1) In general, I don't think it's a good idea for a called function to blow out the system on error. So, in this example, I wouldn't have raised errors be caught in the same function only to call os.exit. I'd either de

Programming Idiomatic Code

2007-07-02 Thread Nathan Harmston
Hi, I m sorry but I m bored at work (and no ones looking so I can write some Python) and following a job advertisement post,I decided to write the code to do its for the one entitled Ninjas or something like that. I was wondering what could be done to my following code to make it more idiomatic...