Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38700
| Date | 2013-02-11 18:09 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: PyDev, pep8.py conflict on spaces around negative numbers |
| References | <a93bb384-ac71-4223-896b-6d47e592abcf@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1666.1360606165.2939.python-list@python.org> (permalink) |
On 2013-02-11 16:39, Wanderer wrote:
> If I check the 'Use space before and after operators? (+, -, /, *,
> //, **, etc.)' in the Eclipse>PyDev>Editor>Code Style> Code
> Formatter, PyDev will insert a space before a negative number in a
> keyword parameter declaration. Pep8.py will then post a warning 'E251
> no spaces around keyword / parameter equals'.
>
> For example:
> foo(bar= -25)
>
> So which is right? Should there be a space before a negative number?
>
Pep8.py is right.
This is preferred:
foo(bar=-25)
as is this:
bar = -25
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PyDev, pep8.py conflict on spaces around negative numbers Wanderer <wanderer@dialup4less.com> - 2013-02-11 08:39 -0800
Re: PyDev, pep8.py conflict on spaces around negative numbers MRAB <python@mrabarnett.plus.com> - 2013-02-11 18:09 +0000
Re: PyDev, pep8.py conflict on spaces around negative numbers Wanderer <wanderer@dialup4less.com> - 2013-02-11 10:56 -0800
Re: PyDev, pep8.py conflict on spaces around negative numbers Wanderer <wanderer@dialup4less.com> - 2013-02-11 10:56 -0800
csiph-web