C++ style const's & types in Python
Tom
tom-main at REMOVEME.home.com
Tue Jun 27 11:50:51 EDT 2000
I'm a C++ developer learning Python.
There are, of course, a few features of C++ that I miss (and many I don't)
and that I think are important for developing larger applications.
One is const types. Particularly given that values are passed to methods by
reference. But am I missing something? Is there any way in Python to
specify that a value (other than a tuple) must remain constant?
Also, type declarations, while a nuisance in short programs, can be valuable
in larger programs. It would be nice if Python names could optionally have
their types fixed. As a substitute, I think I will start using Hungarian
notation to prefix my Python names in cases where I don't intend to
dynamically change their type. Is this stupid? Is there a better
alternative?
I realize that these issues are primarly a result of my C++ background, and
that I will be creating Python programs with a C++ style.
Thanks for your suggestions.
Tom.
More information about the Python-list
mailing list