Python: document writer.SequenceField
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 Dec 2014 18:14:41 +0000 (13:14 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 17 Feb 2015 21:12:04 +0000 (16:12 -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 f50b9d51fc25ec252cf9333fbf7a51f9e76ff9e3..d862cd82a4f809c173800379410b4ae9cc9c15cd 100644 (file)
@@ -1390,10 +1390,20 @@ class ArrayField(Field):
 
 
 class SequenceField(Field):
+    """
+    Sequence (dynamic array) field, based on a
+    :class:`SequenceFieldDeclaration` object.
+    """
+
     @property
     def length(self):
         """
-        Get the sequence's length field (IntegerField).
+        Sequence length (:class:`IntegerField`).
+
+        Set this attribute to change the sequence length's integer
+        field (integer must be unsigned).
+
+        :exc:`ValueError` or :exc:`TypeError` are raised on error.
         """
 
         native_instance = nbt._bt_ctf_field_sequence_get_length(self._f)
@@ -1405,10 +1415,6 @@ class SequenceField(Field):
 
     @length.setter
     def length(self, length_field):
-        """
-        Set the sequence's length field (IntegerField).
-        """
-
         if not isinstance(length_field, IntegerField):
             raise TypeError("Invalid length field.")
 
@@ -1422,7 +1428,9 @@ class SequenceField(Field):
 
     def field(self, index):
         """
-        Return the sequence's field at position "index".
+        Returns the :class:`Field` at index *index* in this sequence.
+
+        :exc:`ValueError` is raised on error.
         """
 
         native_instance = nbt._bt_ctf_field_sequence_get_field(self._f, index)
This page took 0.025197 seconds and 4 git commands to generate.