Email Re: [Python-projects] C0323: "no space before %"

from
to
Francisco Borges <f.borges at rug dot nl>
subject
Re: [Python-projects] C0323: "no space before %"
date
2005/06/15 10:37
On Wednesday 15 June à 10:27, Francisco Borges wrote:
> Hello again,

Hey,
 
> The biggest disagreement I have with pylint is that it's not happy with
> my use of no spaces before '%' when formatting strings.

> Uses of %:

> [1]: "formatting strings"

> log.info("Bla bla %i" %size) ## or
> log.info("bla bla %i %i" %(i, j))

> [2]: "integer division rest"

> rest = mylist % size

> -----------

> Was C0323 intended to handle both cases or only [2]? If is it for both
> cases, would you consider making this configurable??

It was intended to handle both cases. And I would like to make it
configurable but it's really not that simple, since it's based on
multiple regular expressions. It's in our feature request tracker
though.

> Am I the only person that **never** use spaces in [1]?

Can't say, but at Logilab, as you probably have guessed, we usually use
spaces before and after each operator.

-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects


is a reply to