Skip to main content
added 400 characters in body
Source Link
syb0rg
  • 21.8k
  • 10
  • 112
  • 191

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need parentheses, so don't put them around them. You seem to go between doing this and not, remember to also be consistent

    if statements don't need parentheses, so don't put them around them. You seem to go between doing this and not, remember to also be consistent

  • Functions at module level should have two new lines between them and other things, rather than one as you have now.

    Functions at module level should have two new lines between them and other things, rather than one as you have now

  • There should also be two blank lines between the import statements and other code

    In your function calls, you have unexpected spaces around keyword/parameter assignments

  • In Whitespace in Expressions and Statements,

    There should also be two blank lines between the import statements and other code

  • You should have at least two spaces before inline comment.

  • Many of your lines are too long, they should only be 79 characters maximum

  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x 
  • You shouldn't have multiple statements on one line (there should be a newline after the colon)

  • There is no newline at end of file as seen here.

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need parentheses, so don't put them around them. You seem to go between doing this and not, remember to also be consistent
  • Functions at module level should have two new lines between them and other things, rather than one as you have now.
  • There should also be two blank lines between the import statements and other code
  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x 

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need parentheses, so don't put them around them. You seem to go between doing this and not, remember to also be consistent

  • Functions at module level should have two new lines between them and other things, rather than one as you have now

  • In your function calls, you have unexpected spaces around keyword/parameter assignments

  • There should also be two blank lines between the import statements and other code

  • You should have at least two spaces before inline comment.

  • Many of your lines are too long, they should only be 79 characters maximum

  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x 
  • You shouldn't have multiple statements on one line (there should be a newline after the colon)

  • There is no newline at end of file as seen here.

added 3 characters in body
Source Link
syb0rg
  • 21.8k
  • 10
  • 112
  • 191

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need bracketsparentheses, so don't put them around them. You seem to go between doing this and not, remember to also be consistent
  • Functions at module level should have two new lines between them and other things, rather than one as you have now.
  • There should also be two blank lines between the import statements and other code
  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x 

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need brackets, so don't put them around them. You seem to go between doing this and not, remember to also be consistent
  • Functions at module level should have two new lines between them and other things, rather than one as you have now.
  • There should also be two blank lines between the import statements and other code
  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x 

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need parentheses, so don't put them around them. You seem to go between doing this and not, remember to also be consistent
  • Functions at module level should have two new lines between them and other things, rather than one as you have now.
  • There should also be two blank lines between the import statements and other code
  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x 
Source Link
syb0rg
  • 21.8k
  • 10
  • 112
  • 191

Most of this will come down to reading PEP8, however I'll state them here anyway.

  • if statements don't need brackets, so don't put them around them. You seem to go between doing this and not, remember to also be consistent
  • Functions at module level should have two new lines between them and other things, rather than one as you have now.
  • There should also be two blank lines between the import statements and other code
  • In Whitespace in Expressions and Statements,

Avoid extraneous whitespace in the following situations:

...

Immediately before a comma, semicolon, or colon:

Yes: if x == 4: print x, y; x, y = y, x
No:  if x == 4 : print x , y ; x , y = y , x