const in Python

Paul Jackson pj at sgi.com
Tue Feb 8 11:02:31 EST 2000


Fredrik Lundh replied:
|> so you don't trust yourself enough to avoid overwrite
|> anything using a certain name convention (UPPERCASE
|> is pretty much standard in Python land), but are 100%
|> convinced you won't ever overwrite the 'const' variable?

You miss the previous author's point, I suspect.

It's not that 'const' (as fabricated earlier in this thread) is
significantly more or less resistant to willful violation than
UPPERCASE, rather it's that the writer 3 messages ago is more
accustomed to 'const' than UPPERCASE as a reminder of the basic
dataflow fact that the value of this variable won't change again.

Just another minor skirmish in the usual clash of culture and
custom across language boundaries.

Neither of these conventions are padlocks with any substantial
inherent powers of prevention; but rather little yellow stickies,
that serve as one more little reminder of a program's structure.

Hence putting down the convention you don't prefer on account
of its being made of paper, not steel, is a fine example of
constructing a Paper Tiger.

-- 

=======================================================================
I won't rest till it's the best ...	   Software Production Engineer
Paul Jackson (pj at sgi.com; pj at usa.net) 3x1373 http://sam.engr.sgi.com/pj



More information about the Python-list mailing list