[glom] Python Glom module: Improve sphinx-generated documentation.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Python Glom module: Improve sphinx-generated documentation.
- Date: Sat, 24 Apr 2010 20:59:28 +0000 (UTC)
commit 7b264301e29c7270fe255cfae9995f0bef838ece
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Apr 20 23:22:14 2010 +0200
Python Glom module: Improve sphinx-generated documentation.
* glom/python_embed/python_module/py_glom_module.cc: Added class docstring
documentation, based on
http://library.gnome.org/users/glom/unstable/sec-calculated-fields.html
Use reStructuredText format as expected by sphinx and as apparently now
use by Python for docstring text.
glom/python_embed/python_module/py_glom_module.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glom/python_embed/python_module/py_glom_module.cc b/glom/python_embed/python_module/py_glom_module.cc
index f60d84d..56a7e36 100644
--- a/glom/python_embed/python_module/py_glom_module.cc
+++ b/glom/python_embed/python_module/py_glom_module.cc
@@ -47,7 +47,7 @@ BOOST_PYTHON_MODULE(glom_1_14)
"This is the current record of the current table.\n"
"\n"
"Field values\n"
- " Use record['field_name'] to get the value of a specified field in the current record. For instance, this concatenates the values of the name_first and name_last field in the current record.\n"
+ " Use record['field_name'] to get the value of a specified field in the current record. For instance, this concatenates the values of the name_first and name_last fields in the current record.\n"
" ::\n"
"\n"
" record['name_first'] + ' ' + record['name_last']\n"
@@ -67,13 +67,13 @@ BOOST_PYTHON_MODULE(glom_1_14)
" For relationships that specify a single record, you can get the value of a field in that record. For instance, this is the value of the name field in the table indicated by the location relationship (often called location::name).\n"
" ::\n"
"\n"
- " record.related['location']['name']\n"
+ " location_name = record.related['location']['name']\n"
"\n"
"Multiple Related Records\n"
" For relationships that specify multiple records, you can use the aggregate functions to get overall values. For instance, this provides the sum of all total_price values from all of the lines of the current invoice record. See the :class:`RelatedRecord` class for more aggregate functions.\n"
" ::\n"
"\n"
- " record.related['invoice_lines'].sum('total_price')\n"
+ " invoice_total = record.related['invoice_lines'].sum('total_price')\n"
"\n"
"Testing for Empty Values\n"
" How you test for empty values depends on the type of field.\n"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]