Re: [Tutor] Better construct? (was no subject)

2010-06-12 Thread bob gailer
On 6/11/2010 5:12 PM, Advertising Department wrote: Please supply a meaningful subject. #!/Library/Frameworks/Python.framework/Versions/Current/bin/pythonw still thinking in imperative ## obviously this is a bad construct. Why is it obvious? What is this? Are you referring to the

Re: [Tutor] Better construct? (was no subject)

2010-06-12 Thread Alan Gauld
bob gailer bgai...@gmail.com wrote You can collect functions in a sequence, then iterate over it. This allows for easy expansion (when you decide to add another function). funcs = (dosomething(), dosomethingelse()) I suspect Bob meant to leave off the (). You would normally just use the

Re: [Tutor] Better construct? (was no subject)

2010-06-12 Thread bob gailer
On 6/12/2010 3:59 PM, Alan Gauld wrote: bob gailer bgai...@gmail.com wrote You can collect functions in a sequence, then iterate over it. This allows for easy expansion (when you decide to add another function). funcs = (dosomething(), dosomethingelse()) I suspect Bob meant to leave off

Re: [Tutor] Better construct? (was no subject)

2010-06-12 Thread Luke Paireepinart
## Can someone suggest a pythonesque way of doing this? def getid():    response  = raw_input('prompt')    if response not in [ , y, Y, yes] :        getid()    # ouch    print continue working    # do more stuff    # do more stuff This seems like really strange behavior. If the