Overloading the tilde operator?

Ben Finney bignose+hates-spam at benfinney.id.au
Fri Feb 2 01:47:11 EST 2007


James Stroud <jstroud at mbi.ucla.edu> writes:

> Ben Finney wrote:
> > The Python runtime parser is designed to parse Python, not some
> > arbitrary language that someone chooses to implement in Python.
>
> You haven't addressed why the limitation isn't arbitrary.

Good thing I wasn't trying to do that, then. I was pointing out the
source of the limitation.

The Python syntax parser must follow the rules of the Python
language. If you accept that premise, it follows that the '~' operator
is unary only. If you *don't* accept that premise, I have no help to
offer.

-- 
 \     "I cannot conceive that anybody will require multiplications at |
  `\   the rate of 40,000 or even 4,000 per hour ..."  -- F. H. Wales, |
_o__)                                                             1936 |
Ben Finney




More information about the Python-list mailing list