diff options
author | 2014-07-25 23:36:00 +0300 | |
---|---|---|
committer | 2014-07-25 23:36:00 +0300 | |
commit | 465e60e654732b3a0b726d1fd82950fc982fcba2 (patch) | |
tree | 25a1567d99855ff0a2ffcdc1f7c7659f85aaaa0b /Lib/fractions.py | |
parent | Issue #21958: Merge with 3.4 (diff) | |
download | cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.gz cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.bz2 cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.zip |
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 43f146f9391..57bf7f50431 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)""" |