new bitwise module [was Re: Discussion: new operators ...]
Aahz Maruch
aahz at netcom.com
Wed Aug 2 00:47:47 EDT 2000
In article <LcLh5.55086$6y5.37389091 at news2.rdc2.tx.home.com>,
Rainer Deyke <root at rainerdeyke.com> wrote:
>"Aahz Maruch" <aahz at netcom.com> wrote in message
>news:8m7s74$1b2$1 at slb7.atl.mindspring.net...
>>
>> Well, I have a feeling that bit operators are out of place in core
>> Python, especially if long ints become standard. I'm pretty strongly
>> behind this.
>
>All bitwise operators except ~ (which could be redefined as ~a = a ^
>0xffffffff, with strange but predictable results for a > 0xffffffff) still
>make sense for long integers. They are certainly more useful to me than,
>say, floating point numbers (which I despise).
It's not that they don't make sense, it's that I think applying bitwise
operators casually to a long int is a Bad Idea. The standard bitwise
functions could be designed to raise an exception on longs, with special
functions for long ints.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
NOTE: end of September, Earthlink kills Netcom. My new permanent address is
aahz at pobox.com. I have not decided where to set my primary shell account.
Please do not send me e-mail condolences; my mailbox is already too big.
More information about the Python-list
mailing list