PEP8 E226 recommendation

0 votes
The E226 error code is about "missing whitespace around arithmetic operator".

I use Anaconda's package in Sublime which will highlight as a PEP8 E226 violation for example this line:

hypot2 = x*x + y*y
But in Guido's PEP8 style guide that line is actually shown as an example of recommended use of spaces within operators.

So, which is the correct guideline? Always spaces around operators or just in some cases?

Also, who decides what goes into PEP8? I would've thought Guido's recommendation would pretty much determine how that works.
May 23, 2019 in Python by ana1504.k
• 7,910 points
694 views

1 answer to this question.

0 votes
The maintainers of the PEP8 tool decide what goes into it.

As you noticed, these do not always match the PEP8 style guide exactly. In this particular case, I don't know whether it's an oversite by the maintainers, or a deliberate decision. You'd have to ask them to find out, or you might find the answer in the commit history.

Guido recently asked the maintainers of pep8 and pep257 tools to rename them, to avoid this confusion.
answered May 23, 2019 by SDeb
• 13,300 points

Related Questions In Python

0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,464 views
0 votes
1 answer
0 votes
1 answer

PEP8 space after a comma

I guess the reason that most people ...READ MORE

answered Jul 20, 2019 in Python by SDeb
• 13,300 points
1,889 views
0 votes
1 answer

Can u plz provide recorded webinar of movie recommendation system and face mask detection using opencv

Hello, @Vaibhan, Could you please mention the dates ...READ MORE

answered Dec 28, 2020 in Ask us Anything! by Gitika
• 65,770 points
831 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP