Permalink
Browse files

Python 3.3 bugfix. See Decimal.Decimal() Docs

  • Loading branch information...
1 parent 9d4c190 commit c1fd166d8f9c65b40bcdc85ee5be22ca471b90bf @cedeon committed Feb 18, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 PyPDF2/generic.py
View
@@ -210,6 +210,7 @@ def readFromStream(stream, pdf):
class FloatObject(decimal.Decimal, PdfObject):
def __new__(cls, value="0", context=None):
+ if context == None: context=decimal.Context() #Python 3.3 bugfix
return decimal.Decimal.__new__(cls, utils.str_(value), context)
def __repr__(self):
if self == self.to_integral():

0 comments on commit c1fd166

Please sign in to comment.