Upload_transparent

pythonbook-2.5

 
 
 
 
 
Value This
Doc
Scribd
Average
     
Pages: 458 43
Words: 201096 13640
Characters: 1238485 81678
Lines: 8658 623
     
     
Letters per word: 6.16 5.99
Words per line: 23.23 21.89
Words per page: 439.07 317.21

Add to your reading list

Flag_red Flag this document

Document Information

180 Reads | 0 Comments

Description

We have to adopt a style for presenting Python. We won't present a complete set of coding
standards, instead we'll present examples. This section has some justification of the style we
use for the examples in this book.
Just to continune this rant, we find that actual examples speak louder than any of the
gratuitously detailed coding standards which are so popular in IT shops. We find that many
IT organizations waste considerable time trying to write descriptions of a preferred style. A
good example, however, trumps any description. As consultants, we are often asked to
provide standards to an inexperienced team of programmers. The programmers only look at
the examples (often cutting and pasting them). Why spend money on empty verbiage that is
peripheral to the useful example?
One important note: we specifically reject using complex prefixes for variable names.
Prefixes are little more than visual clutter. In many places, for example, an integer parameter
with the amount of a bet might be called pi_amount where the prefix indicates the scope (p
for a parameter) and type (i for an integer). We reject the pi_ as useless and uninformative.
This style of name is only appropriate for primitive types, and doesn't address complex data

Pdf_16x16 458 Pages


Date Added

09/06/2009

Category
Tags
Groups
Copyright

Attribution Non-commercial

More info »

 

or use Facebook Connect