[Python-3000] symbols?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Apr 11 02:11:32 CEST 2006


Kendall Clark wrote:
> One thing I'd really like to see in Python 3000 is support for first- 
> class symbols, with literal syntax.

Actually I think enumerations would be more useful than
symbols. There's no essential difference between a symbol
and an interned string. The only real disadvantage to
using strings as symbols is that you don't get an
immediate NameError if you misspell one. A symbol type
wouldn't solve that problem; enumerations would.
--
Greg


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /