Default method arguments

Duncan Booth duncan.booth at invalid.invalid
Wed Nov 16 06:31:19 EST 2005


Steven D'Aprano wrote:

> My philosophy is, any time you have an object that has a magic meaning
> (e.g. as a sentinel), don't tempt your users to try to use it as if it
> were an ordinary object.

In that case the simplest thing is to give _marker a more appropriate name 
such as '_use_late_bound_default_for_argument' or '_foot_gun_aim_fire'.




More information about the Python-list mailing list