On Sep 22, 8:44 am, Carl Banks [EMAIL PROTECTED] wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days. One of the main uses of bit
fields is flags, but that's not often done in Python because of keyword
: arguments and dicts, which are lot more versatile. Another major use,
: talking to hardware, is not something oft done in Python either.
Are you sure? I've been doing lots of exactly that for 4 years, and
I'm not the only one round here... Python makes an excellent language for
talking to
[EMAIL PROTECTED] wrote:
On Sep 22, 7:04 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Sat, 22 Sep 2007 21:17:38 +, Bryan Olson wrote:
The operator module offers pow(). Is there any good reason for
pow() as a built-in?
The `operator.pow()` is just the function for ``**``, it
On Sat, 22 Sep 2007 05:06:42 +, Stargaming wrote:
On Fri, 21 Sep 2007 23:44:00 -0400, Carl Banks wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days.
Why did we invent the `binary literals`_
On 22/09/2007 1:44 PM, Carl Banks wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days. One of the main uses of bit
fields is flags, but that's not often done in Python because of keyword
arguments and
Carl Banks wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
I'm not. :-)
We use them in numpy. The bitwise operations on int and float arrays aren't all
that useful, but they are very useful for bool arrays. We can't use the
and/or/not keywords
On Sat, 22 Sep 2007 05:19:42 +, Grant Edwards wrote:
On 2007-09-22, Carl Banks [EMAIL PROTECTED] wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not me.
Not many people are bit-fiddling these days.
I do.
Your anecdotal evidence is
Carl Banks wrote:
On Sat, 22 Sep 2007 05:19:42 +, Grant Edwards wrote:
I do.
Your anecdotal evidence is noted and given all the consideration
it's due.
Being funny, or being arrogant? Many today's network protocols work
with bit flags. It is /not/ anecdotal.
I do it all the time.
On 2007-09-22, Carl Banks [EMAIL PROTECTED] wrote:
If you don't want to use the bitwise operations, then ignore
them. Presto! Simpler syntax.
Until people no longer need to read code written by others, this argument
is utter bull.
It's completely besides the point, anyways. The point
Sorry Carl,
I think *you* may not have much need for bitwise operators but others,
including myself do. No matter what the usage found, I would think
replacing bitwise operators by function calls a retrograde step.
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
Not many people are bit-fiddling these days. One of the main uses of bit
fields is flags, but that's not often done in Python because of keyword
arguments and dicts, which are lot more versatile. Another major use,
talking to hardware, is not something oft done in Python
On Sep 21, 10:44?pm, Carl Banks [EMAIL PROTECTED] wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Are you a loony?
Python doesn't have enough bit operations.
I'm always using the gmpy module's bit functions:
digits(...)
On Sep 22, 11:13 am, Bryan Olson [EMAIL PROTECTED] wrote:
One surprising result was that more of the Python
programmers surveyed use bitwise operators than are aware
of the exponentiation operator, which C does not offer.
On that subject, I'd suggest that the pow() builtin (not the **
operator
Carl Banks [EMAIL PROTECTED] writes:
If anyone says, But that takes away an easy test for oddness (x1)!,
or, But you can multiply powers of two using left shift! Isn't that
cool?, I'm not buying it. Those are gimmicks. Arithmetic operations
should be done with arithmetic operators. The
On Sat, 22 Sep 2007 12:57:35 +, Grant Edwards wrote:
On 2007-09-22, Carl Banks [EMAIL PROTECTED] wrote:
Of course it would be. The reason I mention it is that automatic
convertibility is a key factor in whether a change can make it into
Python 3.
It matters not whether fugly code is
On Sat, 22 Sep 2007 14:50:12 +, Paddy wrote:
Sorry Carl,
I think *you* may not have much need for bitwise operators but others,
including myself do. No matter what the usage found, I would think
replacing bitwise operators by function calls a retrograde step.
Well, if people are going to
Carl Banks [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| | Is it worth it to make such a change? It would remove a lot of
operators
| (11 by my count), vastly simplifying syntax, Which, IMHO, is no small
| thing. New numerical types would have fewer operations to support.
Py3
[EMAIL PROTECTED] wrote:
Bryan Olson wrote:
One surprising result was that more of the Python
programmers surveyed use bitwise operators than are aware
of the exponentiation operator, which C does not offer.
On that subject, I'd suggest that the pow() builtin (not the **
operator - just
On 2007-09-22, Carl Banks [EMAIL PROTECTED] wrote:
On Sat, 22 Sep 2007 12:57:35 +, Grant Edwards wrote:
On 2007-09-22, Carl Banks [EMAIL PROTECTED] wrote:
Of course it would be. The reason I mention it is that automatic
convertibility is a key factor in whether a change can make it into
On Sat, 22 Sep 2007 21:17:38 +, Bryan Olson wrote:
The operator module offers pow(). Is there any good reason for
pow() as a built-in?
The `operator.pow()` is just the function for ``**``, it lacks the
optional third argument of the built in `pow()`.
Ciao,
Marc 'BlackJack'
On Sep 22, 7:04 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Sat, 22 Sep 2007 21:17:38 +, Bryan Olson wrote:
The operator module offers pow(). Is there any good reason for
pow() as a built-in?
The `operator.pow()` is just the function for ``**``, it lacks the
optional
On Sat, 22 Sep 2007 18:09:49 +, richyjsm wrote:
On that subject, I'd suggest that the pow() builtin (not the ** operator
- just the pow() function) should also be a candidate for removal...
Help on built-in function pow in module __builtin__:
pow(...)
pow(x, y[, z]) - number
With
On Sep 22, 7:50 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
Everybody forgets that pow can take three arguments, except of course for
those who use that functionality and would be mighty peeved if it went
away.
And who is it who uses this functionality? It's useful in
On Sep 22, 3:29 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Sat, 22 Sep 2007 14:50:12 +, Paddy wrote:
Sorry Carl,
I think *you* may not have much need for bitwise operators but others,
including myself do. No matter what the usage found, I would think
replacing bitwise operators by
[EMAIL PROTECTED] writes:
And who is it who uses this functionality?
I use it but I agree it's easy to implement given the underlying
bignum arithmetic.
It's useful in elementary number theory, sure, but I'd argue that if
there are going to be number theoretical functions in the core then
On Sep 22, 9:10 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Certainly xgcd should be in the math library or somewhere similar.
It does feel odd to have modular exponentiation in the core but no
other number-theoretic stuff in core+libraries. Perhaps a proposal on
python-ideas is in order...
[EMAIL PROTECTED] writes:
Well okay, I take that back---I wouldn't mind *writing* it; I just
wouldn't expect to get much speed from *running* it.
I don't see why not. It's just the basic Python long arithmetic which
is coded in C. I tested it against gmpy (carefully written asm code
and
On Sep 22, 8:29 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Sat, 22 Sep 2007 14:50:12 +, Paddy wrote:
Sorry Carl,
I think *you* may not have much need for bitwise operators but others,
including myself do. No matter what the usage found, I would think
replacing bitwise operators by
On Sep 22, 10:23?pm, [EMAIL PROTECTED] wrote:
On Sep 22, 9:10 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Certainly xgcd should be in the math library or somewhere similar.
It does feel odd to have modular exponentiation in the core but no
other number-theoretic stuff in core+libraries.
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days. One of the main uses of bit
fields is flags, but that's not often done in Python because of keyword
arguments and dicts, which are lot more versatile. Another
On Fri, 21 Sep 2007 23:44:00 -0400, Carl Banks wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days.
Why did we invent the `binary literals`_ (0b101) then?
One of the main uses of
bit fields is flags,
On 2007-09-22, Carl Banks [EMAIL PROTECTED] wrote:
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not me.
Not many people are bit-fiddling these days.
I do.
One of the main uses of bit fields is flags, but that's not
often done in Python because
32 matches
Mail list logo