PyWart: More surpises via "implict conversion to boolean" (and other steaming piles!)

Tim Chase python.list at
Thu Feb 13 12:51:42 CET 2014

On 2014-02-13 05:39, Tim Chase wrote:
>   def age(self, as_of=None):
>     if as_of is None:
>       as_of =
>     return as_of = self.dob

and of course I mean

  return as_of - self.dob

which is what I get for typing in the dark and the "-" and "="
keys are adjacent. :-/


More information about the Python-list mailing list