openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #09074
Re: Being pedantic about pedanticism: HACKING styleguide
Hi Andy,
On 2012-03-22, at 10:00 PM, Andy Smith wrote:
> The rule is there because it makes it obvious where you are using objects from (and they aren't in the current namespace), prevents that "where is this defined -scan around the file- oh, it is being imported from this other thing, let's go look there" pattern, instead you see very obviously that it isn't defined in the file and usually has a unique enough name already that you know exactly where to look.
>
> It is something pulled from the google style guide.
I won't argue with the positive result of the rule - the avoidance of circular imports - but I would not want to endure an increase in code verbosity solely to make it clear where a symbol was defined. Modern editors expose powerful regex search and jump-to-definition functions that make it easy to determine where a symbol comes from.
Cheers,
Maru
References