Future division patch available (PEP 238)
Christian Tanzer
tanzer at swing.co.at
Thu Aug 16 10:25:16 EDT 2001
"Anders J. Munch" <andersjm at dancontrol.dk> wrote:
> Another option would be to add a new infix operator to the language
> with the same precedence as /. Something with a long clunky name, like
> "__oldstyle_divide__", whose only raison d'ĂȘtre is compatibility
> hacks. Changing
> E1 / E2
> to
> E1 __oldstyle_divide__ E2
> doesn't require deep parsing.
Do you really want to replace things like
"""...text and/or more text..."""
by
"""...text and__oldstyle_divide__or more text..."""
???
OTOH, literal strings like "period / 2" might need replacement. And
how about comments?
Applying brute force replacement to Python code is rarely a good idea.
--
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list
mailing list