Better writing in python

Alexandre Badez alexandre.badez at gmail.com
Wed Oct 24 08:09:40 EDT 2007


I'm just wondering, if I could write a in a "better" way this code

lMandatory = []
lOptional = []
for arg in cls.dArguments:
  if arg is True:
    lMandatory.append(arg)
  else:
    lOptional.append(arg)
return (lMandatory, lOptional)

I think there is a better way, but I can't see how...




More information about the Python-list mailing list