diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:43:28 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:43:28 (GMT) |
commit | 2a9b9cbea08c7c22a328926b0e0719fb197743a0 (patch) | |
tree | 51c8930c097a35c97db9cdae6f5af889424cf9bd /Demo/rpc | |
parent | e91fcbdf691c687d1195fad342564e0b3442f444 (diff) | |
download | cpython-2a9b9cbea08c7c22a328926b0e0719fb197743a0.zip cpython-2a9b9cbea08c7c22a328926b0e0719fb197743a0.tar.gz cpython-2a9b9cbea08c7c22a328926b0e0719fb197743a0.tar.bz2 |
#687648 from Robert Schuppenies: use classic division.
Diffstat (limited to 'Demo/rpc')
-rw-r--r-- | Demo/rpc/xdr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/rpc/xdr.py b/Demo/rpc/xdr.py index df5cbaf..041d51a 100644 --- a/Demo/rpc/xdr.py +++ b/Demo/rpc/xdr.py @@ -57,7 +57,7 @@ class Packer: def pack_fstring(self, n, s): if n < 0: raise ValueError, 'fstring size must be nonnegative' - n = ((n+3)/4)*4 + n = ((n + 3)//4)*4 data = s[:n] data = data + (n - len(data)) * '\0' self.buf = self.buf + data @@ -164,7 +164,7 @@ class Unpacker: 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 |