diff options
author | Guido van Rossum <guido@python.org> | 1996-08-26 22:34:57 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-26 22:34:57 +0000 |
commit | 32ad54cf19983a448ad8e93260da6460c537a8bc (patch) | |
tree | 7459a6c96ddc629591f4974bdc0d96dec22397ea /Lib/xdrlib.py | |
parent | a675d27dd5137a9296e87444a0984cd952b4eb02 (diff) | |
download | cpython-32ad54cf19983a448ad8e93260da6460c537a8bc.tar.gz |
No double underscores for globals please
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r-- | Lib/xdrlib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 2c3e3360d7..66a4523098 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -23,7 +23,7 @@ except ImportError: # this test is done to see if machine representation is the same as # network representation. if so, we can use module struct for packing # some data types -__USE_MACHINE_REP = (struct.pack('l', 1) == '\0\0\0\1') +_USE_MACHINE_REP = (struct.pack('l', 1) == '\0\0\0\1') # exceptions class Error: @@ -67,7 +67,7 @@ class Packer: self.__buf = self.__buf + \ (chr(int(x>>24 & 0xff)) + chr(int(x>>16 & 0xff)) + \ chr(int(x>>8 & 0xff)) + chr(int(x & 0xff))) - if __USE_MACHINE_REP: + if _USE_MACHINE_REP: def pack_uint(self, x): if type(x) == LongType: x = int((x + 0x80000000L) % 0x100000000L - 0x80000000L) @@ -171,7 +171,7 @@ class Unpacker: if x < 0x80000000L: x = int(x) return x - if __USE_MACHINE_REP: + if _USE_MACHINE_REP: def unpack_uint(self): i = self.__pos self.__pos = j = i+4 |