new bitwise module --- Use operator module!!

Penfold spam at spam.com
Wed Aug 2 15:23:25 EDT 2000


The fact that I am utterly stupid is often pointed out by those closest to
me, so *surely* I must be missing something here??
Why do we need *another* module representing bitwise infix operators??
There already is one !!

Its called operator.  You know, the one you keep finding so useful in map
functions ;-) If you dont like all that "line noise" then how about.

import operator
operator.rshift(8,2)

You can even rename it to bitwise if you must ... problem solved, move on.
 The following little excerpt did tickle my fancy tho,

Huaiyu Zhu <hzhu at localhost.localdomain> wrote in message
news:slrn8obed7.17f.hzhu at rocket.knowledgetrack.com...
>On Mon, 31 Jul 2000 11:43:14 +0200, Alex Martelli <alex at magenta.com> wrote:
>[snip]
>>No way to
>>take away | & << >> ~ until Python 3000, of course, but, yes, surely when
>>3000's time comes life will be easier if bitwise is the popular way to do
>>things and the linenoise alternative an old/legacy/deprecated one:-).

>That's the idea.  So let's have it.   That would make adding new math
>operators a little easier to swallow as well. :-)

Obviously, <<, >>, & | are classified as "linenoise" and should be removed
from the language.  Now,
exactly how are all these proposed matrix operators ~+ .* not line noise??
And how does *dropping/hiding* one set of operators suddenly make it more
acceptable to insert an equally bizarre
looking set for matrix users :-)

Kooky :-)

D





More information about the Python-list mailing list