No Thoughts about Everything

Dave Brueck dave at pythonapocrypha.com
Wed Feb 25 12:57:30 EST 2004


Arthur wrote:
> >class Foo:
> >  BAR = 10
> >
> >Voila! BAR is now a "class constant" - shared among all instances of the
class
> >Foo (in theory it's not a constant, but in practice it is :) ).
> >
> >HTH,
> >Dave
> >
>
> But not 'final'.
>  I am only anticipating a response.
>
> IMO - if I am understanidng the issues correctly - it is a perfectly
> adequate solution.  Simple to get across to beginners..
>
> The issue of making the constant 'final' is a production programming
> issue.  And whether Python does or does not need it is not an issue
> relative to teaching beginners.  The fact that production programming
> concerns are introduced  at that stage of the game is, I think, where
> many who would otherwise have an intellectual intererst in programming
> fall of the wagon.  Wanting to understand programming and wanting to
> be a production programmer can be very different things.

True, but IMO this particular issue is invalid as a "production programming
concern" as well - it doesn't prevent any problems that actually occur in
practice, or if it does, you have bigger problems on your hands. It falls into
the same bucket of concerns as "our programmers are untrained monkeys and/or
are seeking to destroy our company from the inside".

-Dave





More information about the Python-list mailing list