Better writing in python
Alexandre Badez
alexandre.badez at gmail.com
Wed Oct 24 09:21:49 EDT 2007
Thanks for your try Cliff, I was very confused :P
More over I made some mistake when I post (to make it easiest).
Here is my real code:
with
dArguments = {
'argName' : {
'mandatory' : bool, # True or False
[...], # other field we do not care here
}
}
lMandatory = []
lOptional = []
for arg in cls.dArguments:
if cls.dArguments[arg]['mandatory']:
lMandatory.append(arg)
else:
lOptional.append(arg)
return (lMandatory, lOptional)
So, as you see, we agree each other about "if bool" or "if bool is
True" ;)
So, my question was how to give it a better 'python like' look ?
Any idea ?
More information about the Python-list
mailing list