From: Bob Halley Date: Tue, 3 May 2011 10:01:36 +0000 (+0100) Subject: doco and whitespace compression X-Git-Tag: v1.10.0-py3~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fadf943d2098120dc89ca404550db073f10caf3;p=thirdparty%2Fdnspython.git doco and whitespace compression --- diff --git a/dns/util.py b/dns/util.py index 876f9308..a056142b 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))