I am fairly new to python, and I generally code as a means to an end, as opposed to being a "coder". I like all the power that python contains through libraries, and I enjoy the inherent but invisible strength in python. (E.g., object-oriented, but still relatively scripter-friendly structure for making classes, etc.)
But I keep running into cases where I cannot find complete documentation, and I find pointers to the appropriate documentation only after discovering the problem I have accidentally created. So far, I have only found references to the following appropriate documentation:
PEP 0008
PEP 0257
Unless I missed something, however, neither of these captured issues regarding "proper" python file naming conventions. After making several python scripts, I discovered that I am not supposed to use periods ( . ) in the file name, since it will make it a challenge to import them. After running into this problem, I could indeed find links talking to this point:
no periods allowed
However, I'd really like to start tackling issues pro-actively, instead of having to step backwards through the proper mechanisms. Python has SEVERAL aspects which make it quite unique (such as required whitespace & the aforementioned disallowed periods in filenames). I am too new to say whether these are good things or bad things. But I can say that it is a pain to keep discovering all these things after the fact.
Is there any sort of "encyclopedia" which may capture all these idiosyncrasies, beyond the 2 relatively brief documents I've cited above?
Thanks, all!
Mike
I don't know of any definitive source that covers everything but in addition to the links you already posted you should definitely check these links out for some best practices:
These cover style and also highlight some gotchas that can be avoided by using certain conventions and patterns.
I really like Code Like a Pythonista: Idiomatic Python article by David Goodger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With