[issue18800] Document Fraction's numerator and denominator properties
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from icedream91: The document (http://docs.python.org/3/library/fractions.html) doesn't mention Fraction's numerator and denominator properties, I knew these properties from dir(). Since sometimes these two properties are very useful, for example: http://projecteuler.net/problem=33 and http://projecteuler.net/problem=57 , I think document should mention them. Thanks. ---------- assignee: docs@python components: Documentation messages: 195808 nosy: docs@python, icedream91 priority: normal severity: normal status: open title: Document Fraction's numerator and denominator properties type: enhancement versions: Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Alexander Belopolsky <alexander.belopolsky@gmail.com>: ---------- nosy: +belopolsky _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Serhiy Storchaka <storchaka@gmail.com>: ---------- keywords: +easy nosy: +mark.dickinson, rhettinger stage: -> needs patch versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Madison May added the comment: The docs page does mention, however, that Fraction inherits from numbers.Rational, and links to that page (http://docs.python.org/2/library/numbers.html#numbers.Rational). There the properties 'numerator' and 'denominator' are clearly documented. Perhaps its still worth it to mention those properties on the Fraction docs page though, or to include them in one of the examples. ---------- nosy: +madison.may _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Senthil Kumaran added the comment: How does this simple patch sound? ---------- keywords: +patch nosy: +orsenthil Added file: http://bugs.python.org/file31651/18800.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Madison May added the comment: Simple and to the point. Sounds good to me... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Roundup Robot added the comment: New changeset fe5c03fb0ff6 by Senthil Kumaran in branch '3.3': Document Fraction's numerator and denominator properties. http://hg.python.org/cpython/rev/fe5c03fb0ff6 New changeset 5fb700ca3fd5 by Senthil Kumaran in branch 'default': merge from 3.3 http://hg.python.org/cpython/rev/5fb700ca3fd5 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Senthil Kumaran added the comment: Fixed in applicable versions 3.3 and 3.4. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18800> _______________________________________
participants (7)
-
Alexander Belopolsky
-
Ezio Melotti
-
icedream91
-
Madison May
-
Roundup Robot
-
Senthil Kumaran
-
Serhiy Storchaka