From d4ba140fdee1d4260cee1d7038e3409e9c796cce Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 10 Dec 2014 04:24:45 -0500 Subject: [PATCH] Python: document writer.Field 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/writer.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bindings/python/writer.py b/bindings/python/writer.py index 0f57788e..287e2256 100644 --- a/bindings/python/writer.py +++ b/bindings/python/writer.py @@ -1128,7 +1128,10 @@ def create_field(field_type): class Field: """ - Base class, do not instantiate. + Base class of all fields. This class is not meant to be + instantiated by the user, and neither are its subclasses. Use + :meth:`Event.payload` to access specific, concrete fields of + an event. """ def __init__(self, field_type): @@ -1169,6 +1172,12 @@ class Field: @property def declaration(self): + """ + Field declaration (subclass of :class:`FieldDeclaration`). + + :exc:`TypeError` is raised on error. + """ + native_field_type = nbt._bt_ctf_field_get_type(self._f) if native_field_type is None: -- 2.34.1