- public libgit2 structs should be python objects (classes) - Example: git_repository => Repository()
- nameing convention: strip git_
struct_name
_* - Example: git_repository_config() => Repository.config() - iterations should be implemented as a generator, if this is not possible we need to change libgit2 (other bindings will benefit from this as well)
- every method should map to one libgit2 function (exceptions are iterations)
- return values of methods
- no lists use generators instead
- no dictionaries use tuples or objects instead
- no instantiation of objects use strings instead (important for generators)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Functions to activate/deactivate Continuum Analytics Anaconda Python distribution | |
# by manipulating the $PATH. | |
export ANACONDA_PATH="$HOME/anaconda/bin" | |
function have_anaconda(){ | |
[[ -n $path[(r)$ANACONDA_PATH] ]] | |
} | |
function anaconda_on(){ | |
if have_anaconda ; then |
There are three main kinds of markup that should be used: italics, bold
and fixed-font
. Italics should be used when introducing a new technical
term, bold should be used for emphasis and fixed-font
for source code
Example
When using object-oriented programming in python you must use the
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Good-bye World!" |
Anyone wishing to contribute should join the discussion on the blaze-dev mailing list at: [email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for line in open(__file__): | |
print line[:-1] |
Testing syntax highlight
Python:
import this
for line in open(file):
print line