From 5f6ba8b24a2cdfd573b72584fc28d0506fb11ce8 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 10 Dec 2014 12:18:14 -0500 Subject: [PATCH] Python: document writer.VariantField 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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) -- 2.34.1