[PATCH] send external diff to a file (bug 4047)
Martin Pool
mbp at sourcefrog.net
Fri May 5 08:21:50 BST 2006
On 05/05/2006, at 5:12 PM, James Henstridge wrote:
>
> [...]
>> These imports should really happen at the module level, not inside
>> the
>> diff function.
>
> Is this a new coding guideline for bzr? I noticed a lot of other
> functions that contain imports (including this one), so I just
> followed the existing style. I guessed that this was to remove the
> cost of the imports if the function in question did not get called.
>
> If the recommended style has changed, I can fix things up.
The general rule is to put them at the top level unless either:
- importing them later would substantially reduce the cost
- or importing them later is the best way to resolve a dependency
cycle
--
Martin
More information about the bazaar
mailing list