Fixed #1687: plistlib.py restricts <integer> to Python int when writing

This commit is contained in:
Christian Heimes 2008-01-04 00:04:52 +00:00
parent 2f6621cce7
commit 0613188bc3
2 changed files with 4 additions and 2 deletions

View File

@ -240,8 +240,8 @@ class PlistWriter(DumbXMLWriter):
self.simpleElement("true")
else:
self.simpleElement("false")
elif isinstance(value, int):
self.simpleElement("integer", str(value))
elif isinstance(value, (int, long)):
self.simpleElement("integer", "%d" % value)
elif isinstance(value, float):
self.simpleElement("real", repr(value))
elif isinstance(value, dict):

View File

@ -336,6 +336,8 @@ Core and builtins
Library
-------
- Bug #1687: Fxed plistlib.py restricts <integer> to Python int when writing
- Issue #1700: Regular expression inline flags incorrectly handle certain
unicode characters.