Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Python 3.3 bugfix. See Decimal.Decimal() Docs

  • Loading branch information...
commit c1fd166d8f9c65b40bcdc85ee5be22ca471b90bf 1 parent 9d4c190
William Culver authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  PyPDF2/generic.py
1  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():
Please sign in to comment.
Something went wrong with that request. Please try again.