Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38698 > unrolled thread
| Started by | Wanderer <wanderer@dialup4less.com> |
|---|---|
| First post | 2013-02-11 08:39 -0800 |
| Last post | 2013-02-11 10:56 -0800 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.python
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
| From | Wanderer <wanderer@dialup4less.com> |
|---|---|
| Date | 2013-02-11 08:39 -0800 |
| Subject | PyDev, pep8.py conflict on spaces around negative numbers |
| Message-ID | <a93bb384-ac71-4223-896b-6d47e592abcf@googlegroups.com> |
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?
[toc] | [next] | [standalone]
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2013-02-11 18:09 +0000 |
| Message-ID | <mailman.1666.1360606165.2939.python-list@python.org> |
| In reply to | #38698 |
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
[toc] | [prev] | [next] | [standalone]
| From | Wanderer <wanderer@dialup4less.com> |
|---|---|
| Date | 2013-02-11 10:56 -0800 |
| Message-ID | <6551c5c3-2e22-4b08-90c5-3fbd26271bd0@googlegroups.com> |
| In reply to | #38700 |
On Monday, February 11, 2013 1:09:38 PM UTC-5, MRAB wrote: > 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 Then, I guess I'll uncheck the 'Use space before and after operators' in PyDev. Thanks
[toc] | [prev] | [next] | [standalone]
| From | Wanderer <wanderer@dialup4less.com> |
|---|---|
| Date | 2013-02-11 10:56 -0800 |
| Message-ID | <mailman.1668.1360608992.2939.python-list@python.org> |
| In reply to | #38700 |
On Monday, February 11, 2013 1:09:38 PM UTC-5, MRAB wrote: > 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 Then, I guess I'll uncheck the 'Use space before and after operators' in PyDev. Thanks
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web