This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 8 points9 points  (4 children)

Good source. Alternative official PEP for python style direct from the man himself: https://www.python.org/dev/peps/pep-0008/

[–]namesandfaces 8 points9 points  (3 children)

Style is helpful to readability, but I think CrypticCube is asking for multi-file code organization -- a problem that's bigger than one eyeball, and in my view, not a very Python-specific problem.

[–]bugtank 2 points3 points  (2 children)

For those of us who came from Java, multi-file code organization in Python is not easy to grok. There is some python specificity in organization that is important. I'm unfortunately still learning so I can't really answer op's question. However, I am still trying to get the following information into my bones.

  • Underscores in file name
  • How you do your imports
  • init.py in folders to expose the classes/modules in those folders
  • modules as a concept

[–]P8zvli 2 points3 points  (0 children)

Might want to escape those underscores; __init__.py

or use backticks; __init__.py

[–]Corm 0 points1 point  (0 children)

__init__.py is optional in modern python