How can I create a dict that sets a flag if it's been modified

Paul Rubin http
Thu Jan 12 07:15:10 EST 2006


Brian van den Broek <broek at cc.umanitoba.ca> writes:
> It's broken in at least one way:
> 
>  >>> newmd = ModFlagDict(3=4, 1=5)
> SyntaxError: keyword can't be an expression

newmd = ModFlagDict(**{3:4, 1:5})



More information about the Python-list mailing list