Re: [Python-3000] decorators for variable assignments?

2007-09-21 Thread Arvind Singh
> | @validate_proxy > | proxy = "http://user:[EMAIL PROTECTED]:port/" > | > | be a syntactical sugar for: > | proxy = validate_proxy("http://user:[EMAIL PROTECTED]:port/") > > Sorry, to me, this is syntactical pepper -- or worse ;-) "Poison" perhaps? Then, maybe we can have Poisonous Python! :-

[Python-3000] decorators for variable assignments?

2007-09-21 Thread Arvind Singh
Hi, We have function and class decorators. Can we also have decorators for variable assignments? For example: @validate_proxy proxy = "http://user:[EMAIL PROTECTED]:port/" be a syntactical sugar for: proxy = validate_proxy("http://user:[EMAIL PROTECTED]:port/") Python is often used as a

Re: [Python-3000] ordered dict for p3k collections?

2007-09-16 Thread Arvind Singh
> How do you get from "some keys can't be ordered" to "it doesn't make > sense for Python to have sorteddict or sortedset"? If you want to use > keys that can't be ordered, then feel free to continue to use dict. > For situations in which ordering is important, that language should > support that.

Re: [Python-3000] ordered dict for p3k collections?

2007-09-15 Thread Arvind Singh
> > I hope that Python gets a sorteddict and a > sortedset. It doesn't make sense for Python to have sorteddict or sortedset. You see, dict can have keys which cannot be ordered (keys can be heterogeneous, in which case Py3K may raise TypeError; ordering doesn't make sense for the objects used a

Re: [Python-3000] PEP 3133: Introducing Roles

2007-05-14 Thread Arvind Singh
> Asking Questions About Roles Shouldn't there be some way to ``revoke'' roles? How can we get a list of all roles played by an object? Should there be a way to check ``loosely'' whether an object can potentially play a given role? (i.e., checking whether an object provides a give interface, atl

Re: [Python-3000] Support for PEP 3131

2007-05-13 Thread Arvind Singh
On 5/14/07, Anders J. Munch <[EMAIL PROTECTED]> wrote: You haven't brought any hard evidence to the table yourself, so in the absense of that, my anecdotal evidence trumps your pure speculation ;-) Fact: Younger brains learn new concepts (and languages) faster than older ones. Argument: To be