~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-11 09:26:57 UTC
  • mfrom: (1996.3.37 use_lazy_importer)
  • Revision ID: pqm@pqm.ubuntu.com-20061011092657-e42bec6ef14c036c
(John Arbash Meinel) use lazy importing to improve startup time

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
  from bzrlib import (
228
228
     errors,
229
229
     transport,
230
 
     foo as bar,
 
230
     revision as _mod_revision,
231
231
     )
232
232
  import bzrlib.transport
233
233
  import bzrlib.xml5
234
234
  """)
235
235
 
236
236
At this point, all of these exist as a ``ImportReplacer`` object, ready to
237
 
be imported once a member is accessed.
 
237
be imported once a member is accessed. Also, when importing a module into
 
238
the local namespace, which is likely to clash with variable names, it is
 
239
recommended to prefix it as ``_mod_<module>``. This makes it clean that
 
240
the variable is a module, and these object should be hidden anyway, since
 
241
they shouldn't be imported into other namespaces.
238
242
 
239
243
 
240
244
Modules versus Members