~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2016-04-03 16:32:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6617.
  • Revision ID: jelmer@jelmer.uk-20160403163231-h72bo0uyek2gikw0
Don't put French text in doc/en/user-reference when LANGUAGE=fr_CH.UTF_8.

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.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
 
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
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
 
 
94
85
 
95
86
hasattr and getattr
96
87
===================