summaryrefslogtreecommitdiffstats
path: root/Demo/classes/Complex.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/classes/Complex.py')
-rwxr-xr-xDemo/classes/Complex.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Demo/classes/Complex.py b/Demo/classes/Complex.py
index 4585f62..a9f5c2e 100755
--- a/Demo/classes/Complex.py
+++ b/Demo/classes/Complex.py
@@ -117,15 +117,15 @@ class Complex:
def __repr__(self):
if not self.im:
- return 'Complex(%s)' % `self.re`
+ return 'Complex(%r)' % (self.re,)
else:
- return 'Complex(%s, %s)' % (`self.re`, `self.im`)
+ return 'Complex(%r, %r)' % (self.re, self.im)
def __str__(self):
if not self.im:
- return `self.re`
+ return repr(self.re)
else:
- return 'Complex(%s, %s)' % (`self.re`, `self.im`)
+ return 'Complex(%r, %r)' % (self.re, self.im)
def __neg__(self):
return Complex(-self.re, -self.im)