Python: document writer.SequenceFieldDeclaration
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 16 Dec 2014 23:08:46 +0000 (18:08 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 17 Feb 2015 21:08:46 +0000 (16:08 -0500)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/writer.py

index 65822fa4093803cf2d8ceb7f74e359d9dabc8387..e24631d464321acd3f10e9fc8b761c1188d20cdc 100644 (file)
@@ -1011,9 +1011,19 @@ class ArrayFieldDeclaration(FieldDeclaration):
 
 
 class SequenceFieldDeclaration(FieldDeclaration):
+    """
+    Sequence (dynamic array) field declaration.
+    """
+
     def __init__(self, element_type, length_field_name):
         """
-        Create a new sequence field declaration.
+        Creates a sequence field declaration of
+        elements of type *element_type* (:class:`FieldDeclaration`).
+        The length of a sequence field based on this sequence field
+        declaration is obtained by retrieving the dynamic integer
+        value of the field named *length_field_name*.
+
+        :exc:`ValueError` is raised on error.
         """
 
         self._ft = nbt._bt_ctf_field_type_sequence_create(element_type._ft,
@@ -1023,7 +1033,10 @@ class SequenceFieldDeclaration(FieldDeclaration):
     @property
     def element_type(self):
         """
-        Get the sequence's element type.
+        Type of the elements of this sequence (subclass of
+        :class:`FieldDeclaration`).
+
+        :exc:`TypeError` is raised on error.
         """
 
         ret = nbt._bt_ctf_field_type_sequence_get_element_type(self._ft)
@@ -1036,7 +1049,10 @@ class SequenceFieldDeclaration(FieldDeclaration):
     @property
     def length_field_name(self):
         """
-        Get the sequence's length field name.
+        Name of the integer field defining the dynamic length of
+        sequence fields based on this sequence field declaration.
+
+        :exc:`TypeError` is raised on error.
         """
 
         ret = nbt._bt_ctf_field_type_sequence_get_length_field_name(self._ft)
This page took 0.025384 seconds and 4 git commands to generate.