summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@nominum.com>2011-05-03 11:01:36 +0100
committerBob Halley <halley@nominum.com>2011-05-03 11:01:36 +0100
commit2fadf943d2098120dc89ca404550db073f10caf3 (patch)
treec212ac64cbafeec2b0efff12aa83e33f6c9fd695
parent776ae6b12e90216586a068401e3c0fc787d91b62 (diff)
downloaddnspython-2fadf943d2098120dc89ca404550db073f10caf3.tar.gz
doco and whitespace compression
-rw-r--r--dns/util.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/dns/util.py b/dns/util.py
index 876f930..a056142 100644
--- a/dns/util.py
+++ b/dns/util.py
@@ -18,6 +18,7 @@
import struct
def cmp(x, y):
+ """The cmp() function from Python 2"""
if x > y:
return 1
elif x < y:
@@ -28,25 +29,21 @@ def cmp(x, y):
def write_uint8(bfile, value):
"""Write an unsigned 8-bit integer to an io.BytesIO file
"""
-
bfile.write(struct.pack('B', value))
def write_uint16(bfile, value):
"""Write an unsigned 16-bit integer to an io.BytesIO file
"""
-
bfile.write(struct.pack('!H', value))
def write_uint32(bfile, value):
"""Write an unsigned 32-bit integer to an io.BytesIO file
"""
-
bfile.write(struct.pack('!L', value))
def write_uint64(bfile, value):
"""Write an unsigned 64-bit integer to an io.BytesIO file
"""
-
bfile.write(struct.pack('!Q', value))