Replace the Rational class by fractions.Fraction
Bug #514415 reported by
Olivier Tilloy
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
Fix Released
|
Wishlist
|
Olivier Tilloy |
Bug Description
Python 2.6.4 provides the fractions module (http://
pyexiv2 should use it when available, and emulate it when not. Something along the line of:
try:
from fractions import Fraction
except ImportError:
# Python < 2.6
from pyexiv2.utils import _Fraction as Fraction
where pyexiv2.
Related branches
Changed in pyexiv2: | |
assignee: | nobody → Olivier Tilloy (osomon) |
status: | Triaged → In Progress |
Changed in pyexiv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Note that the fractions.Fraction class implements handy features. For instance, a Fraction can be initialized from a string containing a floating point number.