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 ? -- http://mail.python.org/mailman/listinfo/python-list