From 28081de0978ce380042ac72408bf721429026aa5 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Sat, 6 Dec 2014 16:33:03 -0500 Subject: [PATCH] Python: document IntegerFieldDeclaration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- bindings/python/bt.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/bindings/python/bt.py b/bindings/python/bt.py index 469a3208..09cc9d2f 100644 --- a/bindings/python/bt.py +++ b/bindings/python/bt.py @@ -920,7 +920,9 @@ class FieldDeclaration: class IntegerFieldDeclaration(FieldDeclaration): - """Do not instantiate.""" + """ + Integer field declaration. + """ def __init__(self): raise NotImplementedError("IntegerFieldDeclaration cannot be instantiated") @@ -928,22 +930,23 @@ class IntegerFieldDeclaration(FieldDeclaration): @property def signedness(self): """ - Return the signedness of an integer: - 0 if unsigned; 1 if signed; -1 on error. + 0 if this integer is unsigned, 1 if signed, or -1 on error. """ return nbt._bt_ctf_get_int_signedness(self._fd) @property def base(self): - """Return the base of an int or a negative value on error.""" + """ + Integer's base (``int``), or a negative value on error. + """ return nbt._bt_ctf_get_int_base(self._fd) @property def byte_order(self): """ - Return the byte order. One of class ByteOrder's entries. + Integer's byte order (one of :class:`ByteOrder` constants). """ ret = nbt._bt_ctf_get_int_byte_order(self._fd) @@ -958,8 +961,7 @@ class IntegerFieldDeclaration(FieldDeclaration): @property def length(self): """ - Return the size, in bits, of an int or a negative - value on error. + Integer's length in bits, or a negative value on error. """ return nbt._bt_ctf_get_int_len(self._fd) @@ -967,8 +969,8 @@ class IntegerFieldDeclaration(FieldDeclaration): @property def encoding(self): """ - Return the encoding. One of class CTFStringEncoding's entries. - Return a negative value on error. + Integer's encoding (one of :class:`CTFStringEncoding` + constants). """ return nbt._bt_ctf_get_encoding(self._fd) -- 2.34.1