Steven Bethard wrote:
where I also accept *args and **kwds when the default value is to be called. It's certainly doable with a flag, but note that I have to check the flag every time in both __getitem__ and setdefault.

Alternatively, always use a function for the default value, and set _func to lambda: x when working by value :)


Cheers,
Nick.


-- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net -- http://mail.python.org/mailman/listinfo/python-list

Reply via email to