This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 19c17eca8a9cfe5e86527548a50512d43ff26cf0 (commit) from 0841a375e21de5071687413607915ed4d5b191bf (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/19c17eca8a9cfe5e86527548a50512d43ff26...
commit 19c17eca8a9cfe5e86527548a50512d43ff26cf0 Author: Tomas Gavenciak gavento@ucw.cz Date: Tue Jan 1 21:35:53 2013 +0100
doc: Coding style for Python
diff --git a/doc/coding_style.txt b/doc/coding_style.txt index b4afeaf..ebd0f3f 100644 --- a/doc/coding_style.txt +++ b/doc/coding_style.txt @@ -16,13 +16,13 @@ link:http://www.kernel.org/doc/Documentation/CodingStyle%5Blink] (it's funny and enligthening reading).
.Indentation and whitespaces - + * We use tabs for indentation and tab is eight spaces wide. - + * Lines should be at most 80 chars long. - + * No additional whitespaces (other than newline) at the end of line. - + * Each file must end with newline (most editors do that automatically, beware of Kate).
@@ -37,11 +37,11 @@ enligthening reading). /* WRONG */ if (something) do_work(); do_other(); - + /* RIGHT */ if (something) do_work(); - + do_other(); ----
@@ -117,7 +117,7 @@ GFXprim Specific Rules ** The basic structures are also typedefed so you can wite 'GP_Context' instead of 'struct GP_Context'. ** Other uses of typedef are frowned upon. - + * When you add an externally visible symbol, i.e. new API function please add its name into the corresponding file at 'build/syms/'. You may also run the 'buld/check_symbols.sh' script to check that you haven't @@ -126,4 +126,22 @@ GFXprim Specific Rules Python Coding Style ~~~~~~~~~~~~~~~~~~~
-TODO +The Python parts of GFXprim follow mostly coding style outlined in +link:http://www.python.org/dev/peps/pep-0008/%5BPEP 8]. +The major difference is that the default indent is 2 spaces. +All files should be ASCII unless required otherwise. + +GFXPrim uses CamelCase as described in the C section. +The names are mostly derived from the corresponding C names without +the 'GP_' prefix. +All wrapped symbols of a module are available in the SWIG modules 'foo.c_foo' +(i.e. 'core.c_core'). + +Some number and enum types are typedeffed in C, but left as integers +in the Python interface. +All constants are available in 'foo.C' submodules (i.e. 'core.C') +to avoid clutter. + +Where this makes sense, functions should be available as methods of +an object (i.e. 'Context.Copy()' rather than 'Copy(context)'). Be Pythonic. +
-----------------------------------------------------------------------
Summary of changes: doc/coding_style.txt | 34 ++++++++++++++++++++++++++-------- 1 files changed, 26 insertions(+), 8 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.