~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: Alexander Belchenko
  • Date: 2007-11-19 22:54:30 UTC
  • mfrom: (3006 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3008.
  • Revision ID: bialix@ukr.net-20071119225430-x0ewosrsagis0yno
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
662
662
Coding Style Guidelines
663
663
=======================
664
664
 
 
665
General Python rules
 
666
--------------------
 
667
 
 
668
``hasattr`` should not be used because it swallows exceptions including
 
669
``KeyboardInterrupt``.  Instead, say something like ::
 
670
 
 
671
  if getattr(thing, 'name', None) is None
 
672
 
 
673
 
665
674
Code layout
666
675
-----------
667
676