~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/code-style.txt

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
Python versions
78
78
===============
79
79
 
80
 
Bazaar supports Python from 2.6 through 2.7, and in the future we want to
81
 
support Python 3.  Avoid using language features added in
82
 
2.7, or features deprecated in Python 3.0.  (You can check v3
 
80
Bazaar supports Python from 2.4 through 2.6, and in the future we want to
 
81
support Python 2.7 and 3.0.  Avoid using language features added in 2.5,
 
82
2.6 or 2.7, or features deprecated in Python 3.0.  (You can check v3
83
83
compatibility using the ``-3`` option of Python2.6.)
84
84
 
 
85
Specifically:
 
86
 
 
87
* Don't use the ``with`` statement.
 
88
 
 
89
* Don't ``from . import``.
 
90
 
 
91
* Don't use ``try/except/finally``, which is not supported in Python2.4,
 
92
  use separate nested ``try/except`` and ``try/finally`` blocks.
 
93
 
85
94
 
86
95
hasattr and getattr
87
96
===================