[Python-3000] What makes infix operators special? (was Re: Type parameterization
Nick Coghlan
ncoghlan at gmail.com
Thu May 25 12:07:25 CEST 2006
Greg Ewing wrote:
> Nick Coghlan wrote:
>
>> Using '@' would now be fairly counterintuitive, given that symbol's
>> association with decorators.
>
> It would be very disappointing if @ were now considered
> too "polluted" by association with decorators to be used
> for anything else, since it would mean we have lost both
> a potential prefix operator and a potential infix operator
> in one go.
>
> Personally I don't think there would be any confusion.
Agreed - I've had a look at the relevant PEPs now, and find the S @ T notation
quite understandable. I'd actually find it interesting to see an iterator that
abused __mul__ to implement the semantics (i.e. the PEP's concept of "S @ T"
would be written as "crossproduct(S) * T").
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list