constant in python?

Brian Quinlan brian at
Sat Aug 18 20:27:52 CEST 2001

Paul Rubin:
> 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.

If you believe that then Python might not be the language for you. The
problem with enforcing privacy is that the designer can seldom
anticipate all of the possible uses of their code and placing arbitrary
access restriction can make it impossible for the user to accomplish
their task.

> It makes the "applet sandbox" very straightforward.  This
> is useful for web browser extensions but also for security
> (Dallas Java iButton, Nci)

Python is a general purpose programming language and its design should
not be significantly compromised to make a particular (uncommon) usage
more convenient i.e. security environments.


More information about the Python-list mailing list