From: Philippe Proulx Date: Wed, 10 Dec 2014 17:15:01 +0000 (-0500) Subject: Python: document writer.FloatingPointField X-Git-Tag: v2.0.0-pre1~1360 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=cf3687b5fb60ad6d20404b3744ac47bb5dce9203 Python: document writer.FloatingPointField 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 0ac9e482..62ee2fba 100644 --- a/bindings/python/writer.py +++ b/bindings/python/writer.py @@ -1283,10 +1283,20 @@ class EnumerationField(Field): class FloatingPointField(Field): + """ + Floating point number field, based on a + :class:`FloatingPointFieldDeclaration` object. + """ + @property def value(self): """ - Get a floating point field's value. + Floating point number value (:class:`float`). + + Set this attribute to change the floating point number field's + value. + + :exc:`ValueError` or :exc:`TypeError` are raised on error. """ ret, value = nbt._bt_ctf_field_floating_point_get_value(self._f) @@ -1298,10 +1308,6 @@ class FloatingPointField(Field): @value.setter def value(self, value): - """ - Set a floating point field's value. - """ - if not isinstance(value, int) and not isinstance(value, float): raise TypeError("Value must be either a float or an int")