Here's the SymbolType package that adds symbols to Python. Can those who have done anything useful with Lisp/Scheme tell me what how can I take advantage of this type in Python?
Can it be used to isolate strings coming from outside (from the web) from internal code?
$ sudo easy_install SymbolType
$ ipython
Unfortunately, you can't use symbols to pass values as kwargs:
In [7]: X = s('X', __name__)
In [9]: a = {X: 10}
In [12]: Y = s('Y', __name__)
In [13]: a.update({Y: 20})
In [14]: a
Out[14]: {X: 10, Y: 20}
In [15]: for (k, v) in a.items():
....: print k, v
Y 20
X 10
In [16]: def z(X=0,Y=1):
....: print X, Y
....:
In [17]: z(**a)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
...<ipython console> in <module>()
TypeError: z() keywords must be strings