On Apr 10, 2006, at 8:05 PM, Greg Ewing wrote:

> 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)

Yep, of course. I suspect anyone who's used Python in anger has  
written some such thing. The question is whether it's worth effort to  
have something standardized in the language. I think it would be  
worth the effort, but that's my 2 cents.

Cheers,
Kendall


_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to