[Python-3000-checkins] r45588 - python/branches/p3yk/Lib/xdrlib.py
thomas.wouters
python-3000-checkins at python.org
Fri Apr 21 00:36:58 CEST 2006
Author: thomas.wouters
Date: Fri Apr 21 00:36:57 2006
New Revision: 45588
Modified:
python/branches/p3yk/Lib/xdrlib.py
Log:
Fix typical truedivision problem (using the result of division as an index.)
Modified: python/branches/p3yk/Lib/xdrlib.py
==============================================================================
--- python/branches/p3yk/Lib/xdrlib.py (original)
+++ python/branches/p3yk/Lib/xdrlib.py Fri Apr 21 00:36:57 2006
@@ -80,7 +80,7 @@
if n < 0:
raise ValueError, 'fstring size must be nonnegative'
data = s[:n]
- n = ((n+3)/4)*4
+ n = ((n+3)//4)*4
data = data + (n - len(data)) * '\0'
self.__buf.write(data)
@@ -192,7 +192,7 @@
if n < 0:
raise ValueError, 'fstring size must be nonnegative'
i = self.__pos
- j = i + (n+3)/4*4
+ j = i + (n+3)//4*4
if j > len(self.__buf):
raise EOFError
self.__pos = j
More information about the Python-3000-checkins
mailing list