Grant Edwards wrote: > On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote: >>_NOVALUE = object() >>class demo: >> def foo(v=_NOVALUE): >> if v is _NOVALUE: >> return self.v >> else: >> self.v = v > > > Apart from the change in the logic such that the set operation > doesn't return a value, how is that any different? You're just > creating your own non-integer-value "None" object instead of > using the one built in to the language.
Sorry, my mistake: for some reason, I misunderstood your message as complaining that you couldn't do the same thing if you needed None to be usable as a value too. >>But what's wrong with properties? > > Huh? Why not use a property (http://www.python.org/2.2.1/descrintro.html#property) instead of a special property-like method? -- http://mail.python.org/mailman/listinfo/python-list