Does Python need a '>>>' operator?

Huaiyu Zhu huaiyu at gauss.almadan.ibm.com
Mon Apr 15 14:14:06 EDT 2002


Alex Martelli <aleax at aleax.it> wrote:
>Martin v. Loewis wrote:
>
>> Indeed, and so it is desirable to have infix shorthand notations for
>> the frequent operations. However, as the number of infix operators
>> grows, the convenience loses: you now have to start remembering line
>> noise.
>
>Very well put.  Indeed, given the small amount of bit-twiddling in
>typical Python usage, I think & ~ | ^ are already overboard -- they
>make a lot of sense in C, a very low-level language that is used a
>LOT for bit-twiddling, but, in Python, named built-in functions might
>have been more appropriate in hindsight (fewer precedence levels to
>remember) -- if not, even, functions in a separate module.
>
>A simple histogram of non-alphameric tokens in Lib/*.py only partially
>conforts this thesis:
[snip statistics show small usage of & ~ | ^]

Do you plan to revive the bitwise module you wrote sometime ago?

Huaiyu



More information about the Python-list mailing list