From: Philippe Proulx Date: Wed, 10 Dec 2014 09:24:45 +0000 (-0500) Subject: Python: document writer.Field X-Git-Tag: v2.0.0-pre1~1363 X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=d4ba140fdee1d4260cee1d7038e3409e9c796cce;p=babeltrace.git Python: document writer.Field Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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: