/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: Martin Pool
  • Date: 2007-11-15 04:13:34 UTC
  • mto: This revision was merged to the branch mainline in revision 3004.
  • Revision ID: mbp@sourcefrog.net-20071115041334-wfkrz0y0lzdtpkfj
HACKING: say not to use hasattr()

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