new bitwise module [was Re: Discussion: new operators ...]

Gregory Lielens gregory.lielens at fft.be
Wed Aug 2 13:12:40 EDT 2000


"tanzer at swing.co.at" wrote:
> 
> Gregory Lielens <gregory.lielens at fft.be> wrote:
> 
> > The advantage is that it would make translation of current python
> > trivial : just change | to ~or, ...
> 
> He said and changed all his regular expressions along the way...
> 
> --
> 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


It is of course a problem...but it seems to me - and I say that as a guy
which barely use regexp - that skipping quoted and triple quoted string
during the search and replace is maybe a solution? I do not know if
skipping these is easy, but it seems like a good work for regular
expressions :-)
Still, unless some consensus is achieved to say that we can not live
with |,& and co, I agree with Huaiyu (and with you, I think): It is not
a good idea to replace them before python3000...even if an antomatic
translator exist, it is probably not a good idea to break code unless it
is used...But allowing to translate, keeping | and ~or as synonym during
an hypothetical pre-python3000 stage is maybe something to consider?


Greg.




More information about the Python-list mailing list