Brett Cannon schrieb:
> Seems reasonable to me. Is the argument of None passed in
> automatically somewhere?
There are few callers of nb_inplace_power at all (AFAICT, only
PyNumber_InPlacePower); in turn, PyNumber_InPlacePower is called
with the implicit Py_None always:
- ceval.c, for INPLACE_P
Raymond Hettinger schrieb:
> That made sense, but my question was whether there would be benefit
> to making the change in the middle of a major release. At worst, code
> that is
> currently working due to undefined behavior will stop working. I don't
> see any offsetting benefit. ISTM that Py
Greg Ewing schrieb:
> Might we want to add an in-place version of the 3-arg
> pow() function one day? If so, leaving the third argument
> there could be useful.
What could the syntax for that be?
Instead of writing
x = pow(x, n, 10)
would you write
x pow n = 10
? or perhaps
x ** n = 10
or
x
Guido van Rossum schrieb:
> I recently needed to access an HTTP URL with a timeout. I ended up
> monkey-patching httplib.HTTPConnection so that the connect() method
> has an optional second paramer, timeout, defaulting to None; if not
> None, a call to settimeout() is added right after successful c
Guido> I recently needed to access an HTTP URL with a timeout. I ended
Guido> up monkey-patching httplib.HTTPConnection so that the connect()
Guido> method has an optional second paramer, timeout, defaulting to
Guido> None; if not None, a call to settimeout() is added right after
Greg Ewing schrieb:
> Might we want to add an in-place version of the 3-arg
> pow() function one day? If so, leaving the third argument
> there could be useful.
"Martin v. Löwis" martin at v.loewis.de replied:
> What could the syntax for that be?
> Instead of writing
> x = pow(x, n, 10)
Either
On 2/9/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Brett Cannon schrieb:
> > Seems reasonable to me. Is the argument of None passed in
> > automatically somewhere?
>
> There are few callers of nb_inplace_power at all (AFAICT, only
> PyNumber_InPlacePower); in turn, PyNumber_InPlacePower is
On Friday 09 February 2007 08:52, [EMAIL PROTECTED] wrote:
> In principle it's probably a fine idea. We should consider if it's
> possible to develop a uniform approach to timeouts for all the libraries
> that use sockets though. Otherwise you run the risk of doing it in
> different ways for
On 2/9/07, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote:
> On Friday 09 February 2007 08:52, [EMAIL PROTECTED] wrote:
> > In principle it's probably a fine idea. We should consider if it's
> > possible to develop a uniform approach to timeouts for all the libraries
> > that use sockets though.
Guido> Didn't work for me, since my ap is a multi-threaded webserver and
Guido> I only want one specific type of request to time out.
Understood.
Guido> I'm not going to change ftplib.py and all the others.
Also understood. This has, as far as I know, been the response of everybody
You're not helping, Skip. Can you spend a minute looking at urllib2
and seeing how the two variants of my proposal (pass to constructor
vs. pass to connect()) would impact on it?
--Guido
On 2/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Guido> Didn't work for me, since my ap is a mu
Martin v. Löwis wrote:
> Greg Ewing schrieb:
>
>> Might we want to add an in-place version of the 3-arg
>> pow() function one day?
>
> What could the syntax for that be?
It wouldn't be a syntax, just a function, e.g.
ipow(x, n, 10)
> Also, it would break existing __ipow__ implementations
>
12 matches
Mail list logo