Equivalents of Ruby's "!" methods?
hniksic at xemacs.org
Mon Aug 25 16:22:55 CEST 2008
"Simon Mullis" <simon at mullis.co.uk> writes:
> There is no equivalent in Python (as far as I know, and I'm only in
> my second week of Python so I'm more than likely incorrect!).
Python uses strings for that purpose, which works well due to their
immutability. Python automatically interns strings used in source
code that look like identifiers, so memory is saved.
An even closer equivalent of symbols are interned strings (see the
"intern" built-in), but they are not as nice to work with as "real"
More information about the Python-list