[Bf-python] Lets try this

Ed Blake kitsune_e at yahoo.com
Tue Jun 8 07:04:48 CEST 2004


first test, I plan to go into every module and update the doc strings.  This
is the first attempt though.  I am using the format that python returned when
I did print [].append.__doc__ and a couple others.

//doc strings
char Vector_Zero_doc[] =
"Vector.zero() -> None\n\nSets all values in the vector to 0.\nOperation is\
 preformed in-place.";
char Vector_Normalize_doc[] =
"Vector.normalize() -> None\n\nNormalizes the vector (resizes to a unit
length\
 vector).\nOperation is preformed in-place.";
char Vector_Negate_doc[] =
"Vector.negate() -> None\n\nChanges the vector to it's additive inverse.\n\
Operation is preformed in-place.";
char Vector_Resize2D_doc[] =
"Vector.resize2D() -> None\n\nResizes a vector to [x,y].\nOperation is\
 preformed in-place, extra places are truncated.";
char Vector_Resize3D_doc[] =
"Vector.resize3D() -> None\n\nResizes a vector to [x,y,z].\nOperation is\
 preformed in-place, extra places are truncated.";
char Vector_Resize4D_doc[] =
"Vector.resize4D() -> None\n\nResizes a vector to [x,y,z,w].\nOperation is\
 preformed in-place, extra places are truncated.";

The output has a newline where it is convenient, and the string is wrapped as
close as possible to col 80 as per the coding style guide.  A question I
have:  In some modules the doc strings are in the header file, and in others
it is in the C code.  Which of these is preferred (which should be the
standard)?  Also should I leave the bit about the operation being in-place
when the return value is given?



More information about the Bf-python mailing list