[Python-3000] symbols?

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


Kendall Clark wrote:
> Folks,
> 
> One thing I'd really like to see in Python 3000 is support for first- 
> class symbols,
> 
> 	def web_dispatch("/bank-account", :GET, retrieve_account): pass

class SymGen:

   def __getattr__(self, name):
     return intern(name)

sym = SymGen()

web_dispatch("/bank-account", sym.GET, retrieve_account)

--
Greg


More information about the Python-3000 mailing list