[Zope-Checkins] CVS: Zope2 - ppml.py:1.10

Brian Lloyd brian@digicool.com
Wed, 4 Apr 2001 14:33:11 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/Shared/DC/xml
In directory korak:/home/brian/temp/mainline-python-21/lib/python/Shared/DC/xml

Modified Files:
	ppml.py 
Log Message:
fixed an assumption about trailing 'L' in str() of long



--- Updated File ppml.py in package Zope2 --
--- ppml.py	2000/10/22 00:34:18	1.9
+++ ppml.py	2001/04/04 18:33:10	1.10
@@ -202,7 +202,12 @@
 
 class Int(Scalar): pass
 class Long(Scalar): 
-    def value(self): return str(self._v)[:-1]
+    def value(self):
+        result = str(self._v)
+        if result[-1:] == 'L':
+            return result[:-1]
+        return result
+
 class Float(Scalar): pass
 class String(Scalar):
     def __init__(self, v, encoding=''):