Re: [Tutor] Trickier exercise: convert string to complex number

2009-07-11 Thread Emile van Sebille
On 7/10/2009 7:15 PM Angus Rodgers said... and such misdemeanours from string import whitespace def no_spaces(str): Generally, don't shadow builtins (ie, don't use vars with the same names as builtin functions -- str in this case) Emile ___

Re: [Tutor] Trickier exercise: convert string to complex number

2009-07-11 Thread Angus Rodgers
>Date: Sat, 11 Jul 2009 14:33:58 +1000 >From: Lie Ryan >Message-ID: > >Err... what's the question? Are you asking for style checking or the >mentioned "bugs" in the comments? Mainly style checking (but more generally anything silly that I'm doing, that might leap to somebody's eye). Any time my

Re: [Tutor] Trickier exercise: convert string to complex number

2009-07-10 Thread Lie Ryan
Angus Rodgers wrote: > Wesley Chun, /Core Python Programming/, Ex. 6-13: > > "[...] An atoc() was never implemented in the string module, so > that is your task here. atoc() takes a single string as input, > a string representation of a complex number [...] and returns > the equivalent comple

Re: [Tutor] Trickier exercise: convert string to complex number

2009-07-10 Thread Rich Lovely
On 11 Jul 2009, at 03:15, Angus Rodgers wrote: Wesley Chun, /Core Python Programming/, Ex. 6-13: "[...] An atoc() was never implemented in the string module, so that is your task here. atoc() takes a single string as input, a string representation of a complex number [...] and returns the eq