user-defined operators: a very modest proposal
jepler at unpythonic.net
jepler at unpythonic.net
Tue Nov 22 19:55:53 EST 2005
On Tue, Nov 22, 2005 at 04:08:41PM -0800, Steve R. Hastings wrote:
> Actually, that's a better syntax than the one I proposed, too:
>
> __+__
> # __add__ # this one's already in use, so not allowed
> __outer*__
Again, this means something already.
>>> __ = 3
>>> __+__
6
>>> __outer = 'x'
>>> __outer*__
'xxx'
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051122/1ea803ad/attachment.sig>
More information about the Python-list
mailing list