osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


On 2014-02-13 05:39, Tim Chase wrote:
>   def age(self, as_of=None):
>     if as_of is None:
>       as_of = datetime.date.today()
>     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. :-/

-tkc