summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-04 00:04:52 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-04 00:04:52 (GMT)
commit0613188bc3ad62b96d5dae879814d0e8563d955c (patch)
treef14356b3afa773736bdf0527208901463c42c9d7
parent2f6621cce7846a221b81e4dcb113824b08a9a12f (diff)
downloadcpython-0613188bc3ad62b96d5dae879814d0e8563d955c.zip
cpython-0613188bc3ad62b96d5dae879814d0e8563d955c.tar.gz
cpython-0613188bc3ad62b96d5dae879814d0e8563d955c.tar.bz2
Fixed #1687: plistlib.py restricts <integer> to Python int when writing
-rw-r--r--Lib/plat-mac/plistlib.py4
-rw-r--r--Misc/NEWS2
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
index 49bd556..e61c4a4 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -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):
diff --git a/Misc/NEWS b/Misc/NEWS
index 5ea88f2..87de123 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.