On 11/28/06, jack.diederich <[email protected]> wrote: > > Modified: python/branches/p3yk/Lib/decimal.py > ============================================================================== > --- python/branches/p3yk/Lib/decimal.py (original) > +++ python/branches/p3yk/Lib/decimal.py Tue Nov 28 20:15:13 2006 > @@ -633,14 +633,14 @@ > return other > return 0 > > - def __nonzero__(self): > + def __bool__(self): > """Is the number non-zero? > > 0 if self == 0 > 1 if self != 0 > """ > if self._is_special: > - return 1 > + return True > return sum(self._int) != 0
Should also update the docstring. Otherwise, looks good. Thanks! n _______________________________________________ Python-3000-checkins mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000-checkins
