From: Philippe Proulx Date: Wed, 10 Dec 2014 17:18:14 +0000 (-0500) Subject: Python: document writer.VariantField X-Git-Tag: v2.0.0-pre1~1358 X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=5f6ba8b24a2cdfd573b72584fc28d0506fb11ce8;p=babeltrace.git Python: document writer.VariantField 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 18bcb3ce..06664808 100644 --- a/bindings/python/writer.py +++ b/bindings/python/writer.py @@ -1346,9 +1346,17 @@ class StructureField(Field): class VariantField(Field): + """ + Variant field, based on a + :class:`VariantFieldDeclaration` object. + """ + def field(self, tag): """ - Return the variant's selected field. The "tag" field is the selector enum field. + Returns the :class:`Field` selected by the current label of + *tag* (:class:`EnumerationField`). + + :exc:`ValueError` is raised on error. """ native_instance = nbt._bt_ctf_field_variant_get_field(self._f, tag._f)