Search code examples
pythonsymbiancoding-stylepys60pep8

Clashing guidelines


While coding in Python it's better to code by following the guidelines of PEP8.

And while coding for Symbian it's better to follow its coding standards.

But when I code for PyS60 which guidelines should I follow? Till now I have been following PEP8, but this code shows the opposite. Do I need to rework my code?


Solution

  • I don't see anything in your code sample that is obviously bogus. It's not the style I'd use, but neither is it hard to read, and it's not so far from PEP8 that I'd call it “the opposite”.

    PEP8 shouldn't be seen as hard-and-fast law to which all code must conform, character by rigid character. It is a baseline for readable Python. When you go a little bit Java-programmer and get that antsiness about making the spacing around every operator consistent, go back and read the start of PEP8 again. The bit with the hobgoblin.

    Don't get hung up on lengthy ‘reworking’ of code that is functional, readable, and at least in the same general vicinity as PEP8.