[MERGE][Trivial] invalid version tuple attempt to raise AssertionError fails with TypeError

Martin Pool mbp at canonical.com
Wed Sep 24 01:45:32 BST 2008


On Wed, Sep 24, 2008 at 1:21 AM, Mark Hammond <mhammond at skippinet.com.au> wrote:
>> Mark Hammond wrote:
>> > bzrtools:
>> >
>> >  from bzrlib import revision as _mod_revision
>>
>> That is not an example of importing a private symbol.
>
> Could you please clarify?  It has a leading underscore, which is a
> bright-red flag to my (and grep's ;) eyes...

As John explained its official name is bzrlib.revision, you're just
renaming it to _mod_revision.  This is a convention we have for cases
where we want an import not to clash with a local variable name like
'revision'.  It doesn't particularly mean it's private, though in a
sense the rebound name is meant only for use within the module that's
importing it.  We hang a lot on one little underscore.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list