[Bf-blender-cvs] [8be2775] gooseberry: PyAPI: clarify fallback docstring

Campbell Barton noreply at git.blender.org
Fri Mar 6 17:24:44 CET 2015


Commit: 8be277536790ef222104955d45e03ecd15138f59
Author: Campbell Barton
Date:   Fri Mar 6 18:50:58 2015 +1100
Branches: gooseberry
https://developer.blender.org/rB8be277536790ef222104955d45e03ecd15138f59

PyAPI: clarify fallback docstring

===================================================================

M	source/blender/python/mathutils/mathutils_Matrix.c
M	source/blender/python/mathutils/mathutils_Vector.c

===================================================================

diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index d4ed859..67905f8 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1438,8 +1438,8 @@ PyDoc_STRVAR(Matrix_inverted_doc,
 "\n"
 "   Return an inverted copy of the matrix.\n"
 "\n"
-"   :arg fallback: return this value when the inverse can't be calculated\n"
-"      (instead of raising a :exc:`ValueError` exception).\n"
+"   :arg fallback: return this when the inverse can't be calculated\n"
+"      (instead of raising a :exc:`ValueError`).\n"
 "   :type fallback: any\n"
 "   :return: the inverted matrix or fallback when given.\n"
 "   :rtype: :class:`Matrix`\n"
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 5cb7d71..a33b55c 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -957,13 +957,11 @@ PyDoc_STRVAR(Vector_angle_doc,
 "\n"
 "   :arg other: another vector to compare the angle with\n"
 "   :type other: :class:`Vector`\n"
-"   :arg fallback: return this value when the angle can't be calculated\n"
-"      (zero length vector)\n"
+"   :arg fallback: return this when the angle can't be calculated (zero length vector),\n"
+"      (instead of raising a :exc:`ValueError`).\n"
 "   :type fallback: any\n"
 "   :return: angle in radians or fallback when given\n"
 "   :rtype: float\n"
-"\n"
-"   .. note:: Zero length vectors raise an :exc:`ValueError`.\n"
 );
 static PyObject *Vector_angle(VectorObject *self, PyObject *args)
 {
@@ -1021,13 +1019,11 @@ PyDoc_STRVAR(Vector_angle_signed_doc,
 "\n"
 "   :arg other: another vector to compare the angle with\n"
 "   :type other: :class:`Vector`\n"
-"   :arg fallback: return this value when the angle can't be calculated\n"
-"      (zero length vector)\n"
+"   :arg fallback: return this when the angle can't be calculated (zero length vector),\n"
+"      (instead of raising a :exc:`ValueError`).\n"
 "   :type fallback: any\n"
 "   :return: angle in radians or fallback when given\n"
 "   :rtype: float\n"
-"\n"
-"   .. note:: Zero length vectors raise an :exc:`ValueError`.\n"
 );
 static PyObject *Vector_angle_signed(VectorObject *self, PyObject *args)
 {
@@ -1195,8 +1191,8 @@ PyDoc_STRVAR(Vector_slerp_doc,
 "   :type other: :class:`Vector`\n"
 "   :arg factor: The interpolation value typically in [0.0, 1.0].\n"
 "   :type factor: float\n"
-"   :arg fallback: return this value when the vector can't be calculated\n"
-"      (zero length vector or direct opposites)\n"
+"   :arg fallback: return this when the vector can't be calculated (zero length vector or direct opposites),\n"
+"      (instead of raising a :exc:`ValueError`).\n"
 "   :type fallback: any\n"
 "   :return: The interpolated vector.\n"
 "   :rtype: :class:`Vector`\n"




More information about the Bf-blender-cvs mailing list