summaryrefslogtreecommitdiff
path: root/Demo/classes/Complex.py
diff options
context:
space:
mode:
authorJack Diederich <jackdied@gmail.com>2006-11-28 19:15:13 +0000
committerJack Diederich <jackdied@gmail.com>2006-11-28 19:15:13 +0000
commit4dafcc4ece09c2a60473bb109513de4e7d2c2b11 (patch)
tree32be8af9dd16e1ea407bf008c92d62f7cd7539bd /Demo/classes/Complex.py
parentdfc9d4f7aa38a3961847c034532e39f05a569f54 (diff)
downloadcpython-git-4dafcc4ece09c2a60473bb109513de4e7d2c2b11.tar.gz
- patch #1600346 submitted by Tomer Filiba
- Renamed nb_nonzero slots to nb_bool - Renamed __nonzero__ methods to __bool__ - update core, lib, docs, and tests to match
Diffstat (limited to 'Demo/classes/Complex.py')
-rwxr-xr-xDemo/classes/Complex.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Demo/classes/Complex.py b/Demo/classes/Complex.py
index a77989750f..2019cdf32d 100755
--- a/Demo/classes/Complex.py
+++ b/Demo/classes/Complex.py
@@ -165,7 +165,7 @@ class Complex:
other = ToComplex(other)
return cmp(other, self)
- def __nonzero__(self):
+ def __bool__(self):
return not (self.re == self.im == 0)
abs = radius = __abs__