constant in python?

Paul Rubin phr-n2001 at nightsong.com
Sat Aug 18 13:50:18 EDT 2001


"Brian Quinlan" <BrianQ at ActiveState.com> writes:
> The questions is why do you need explicit language support for
> constants? Just don't change the value and it should behave constant
> enough for you.

I dislike the runtime system and the doctrinaire OO culture that's
grown up around Java, but having constants, and rigorously enforcing
protection of private class members and methods is one thing Java did
right.  It makes the "applet sandbox" very straightforward.  This
is useful for web browser extensions but also for security coprocessors
(Dallas Java iButton, Nci

I understand Python has some kind of "restricted execution" package
that might take care of this but I haven't studied it yet.  Perl has
one but it's kludgy.



More information about the Python-list mailing list