forcing variable declaration ??

Chad Netzer cnetzer at mail.arc.nasa.gov
Tue May 27 14:29:51 EDT 2003


On Tue, 2003-05-27 at 06:22, Alan Kennedy wrote:

> If you mean declaring the type of a variable, however, that's another
> matter entirely.

One can also use the 'traits' package, available at scipy.org.  It
allows you declare instance attributes with restricted types (and even
ranges, for example you can ask that an attribute be positive, or be
between 6 and 10, etc.)

http://www.scipy.org/site_content/traits/

-- 

Chad Netzer
(any opinion expressed is my own and not NASA's or my employer's)






More information about the Python-list mailing list