SpecialistOff.NET
/ Вопросы
/ Статьи
/ Фрагменты кода
/ Резюме
/ Метки
/ Помощь
/ Файлы
Назад
Mechanics
Метки:
python
- Automate everything. Everything should be in the build script; nothing should be done by hand.
- All documents will be in Sphinx restructured text format. Here’s the link to the Sphinx documentation.
- Everything goes through Launchpad.net and uses Launchpad’s Bazzar distributed version control system.
- Follow PEP8 for style. That way we don’t have to argue about it.
- Camelcasing for naming. PEP8 suggests underscores as a preference rather than a hard-and fast rule, and camelcasing feels more like OO to me, as if we are emphasizing the design here (which I want to do) and putting less focus on the C-ish nature that can be expressed in Python.
The above point is still being debated.
- Four space indents.
- We’re not using chapter numbers because we’ll be moving chapters around. If you need to cross-reference a chapter, use the chapter name and a link.
- Index as you go. Indexing will happen throughout the project. Although finalizing the index is a task in itself, it will be very helpful if everyone adds index entries anytime they occur to you. You can find example index entries by going to the index, clicking on one of the entries, then selecting “view source” in the left-side bar (Sphinx cleverly shows you the Sphinx source so you can use it as an example).
- Don’t worry about chapter length. Some chapters may be very small, others may be quite significant. It’s just the nature of this book. Trying to make the chapters the same length will end up fluffing some up which will not benefit the reader. Make the chapters however long they need to be, but no longer.