diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 23:36:00 +0300 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-25 23:36:00 +0300 |
| commit | bcd8dccf51c716a73884baa8eb3ad84065685a8b (patch) | |
| tree | 0efe0e4670465a6f2e2ee3099a73dd97b21d1f33 /Lib/fractions.py | |
| parent | 59b7ff6ad555c21e72acbed0f86849f6907e8d40 (diff) | |
| download | cpython-bcd8dccf51c716a73884baa8eb3ad84065685a8b.tar.gz | |
Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
Diffstat (limited to 'Lib/fractions.py')
| -rw-r--r-- | Lib/fractions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/fractions.py b/Lib/fractions.py index 43f146f939..57bf7f5043 100644 --- a/Lib/fractions.py +++ b/Lib/fractions.py @@ -280,7 +280,8 @@ class Fraction(numbers.Rational): def __repr__(self): """repr(self)""" - return ('Fraction(%s, %s)' % (self._numerator, self._denominator)) + return '%s(%s, %s)' % (self.__class__.__name__, + self._numerator, self._denominator) def __str__(self): """str(self)""" |
