Mike Meyer wrote:
> On Wed, 06 Feb 2008 01:01:05 +1000 Nick Coghlan <[EMAIL PROTECTED]> wrote:
>> While I'm +1 on the idea of making altinstall the default for setup.py
>> and the Windows installer (forcing the administrator to explicitly
>> request that the new Python version be made the default
On Wed, 06 Feb 2008 10:32:53 +0900 "Stephen J. Turnbull" <[EMAIL PROTECTED]>
wrote:
> Mike Meyer writes:
> > On Tue, 05 Feb 2008 08:20:00 +0900 "Stephen J. Turnbull" <[EMAIL
> PROTECTED]> wrote:
> > > Mike Meyer writes:
> > > > On Mon, 04 Feb 2008 20:22:04 +0900 "Stephen J. Turnbull" <[EMAIL
This is very similar to the #! idea and is really just an extension.
Python 2 clearly cannot execute python 3 code, but how hard would it
be to require something like a
__pyversion__ = 3 statement at the top of the file. If the line does
not exist, the python3 binary would dlopen libpython2.x and
Phillip J. Eby wrote:
> FYI, setuptools uses and supports #! lines on Windows, with the
> executable path in quotes if it contains spaces. For a given script
> "foo", it generates two files:
>
> foo.exe
> foo-script.py
>
> And the .exe is just a standardized .exe file that looks in a
Phillip J. Eby wrote:
> FYI, setuptools uses and supports #! lines on Windows, with the
> executable path in quotes if it contains spaces. For a given script
> "foo", it generates two files:
>
> foo.exe
> foo-script.py
>
> And the .exe is just a standardized .exe file that looks in a
> My new
> sys._compact_freelists() deallocates the float and int blocks which do
> not contain a referenced object.
I wonder whether such a thing should run as a side effect of a full
garbage collection, also. GC has a chance to free up arenas for good,
and allocated-but-unused blocks on arenas
Christian Heimes schrieb:
> Phillip J. Eby wrote:
>> FYI, setuptools uses and supports #! lines on Windows, with the
>> executable path in quotes if it contains spaces. For a given script
>> "foo", it generates two files:
>>
>> foo.exe
>> foo-script.py
>>
>> And the .exe is just a st
At 07:38 PM 2/6/2008 +0100, Christian Heimes wrote:
>The first line of the file is read and parsed. The line must start with
>a shebang (#!). Contrary to your script it doesn't look for a complete
>path but searches for pythonX.Y. "#!python2.5" or "#!/usr/bin/python2.5"
>both work.
>
>Then the laun
Martin v. Löwis wrote:
> I wonder whether such a thing should run as a side effect of a full
> garbage collection, also. GC has a chance to free up arenas for good,
> and allocated-but-unused blocks on arenas prevent Python from returning
> them to the OS.
Under which condition does a full garbag
The tuple class is registered to the collections.Sequence ABC, but it does not
support count() and index() as required by the ABC.
Do you want to drop those methods from the ABC or add them to tuple?
Raymond
___
Python-3000 mailing list
Python-3000@py
On Feb 6, 2008 2:29 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> The tuple class is registered to the collections.Sequence ABC, but it does
> not support count() and index() as required by the ABC.
Good catch!
> Do you want to drop those methods from the ABC or add them to tuple?
I'm not
>> Do you want to drop those methods from the ABC or add them to tuple?
> I'm not sure, but I'm tempted to add them to the ABC.
> What's your hunch?
My hunch is that adding count() and index() to tuple is at
harmless at worst and sometimes helpful at best (I've
occasionally needed them and felt m
On Feb 6, 2008 2:29 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> Do you want to drop those methods from the ABC or add them to tuple?
On Feb 6, 2008, at 5:40 PM, Guido van Rossum wrote:
> I'm not sure, but I'm tempted to add them to the ABC. What's your
>
Is Guido having a bad typing day?
On Feb 6, 2008 2:58 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
> On Feb 6, 2008 2:29 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> > Do you want to drop those methods from the ABC or add them to tuple?
>
>
> On Feb 6, 2008, at 5:40 PM, Guido van Rossum wrote:
> > I'm not sure, but I'm tempted t
Christian Heimes wrote:
> Martin v. Löwis wrote:
>> I wonder whether such a thing should run as a side effect of a full
>> garbage collection, also. GC has a chance to free up arenas for good,
>> and allocated-but-unused blocks on arenas prevent Python from returning
>> them to the OS.
>
> Under
[Fred Drake]
> I'd be happy seeing these methods added to tuple; there's
> no reason that they would only be useful on mutable sequences.
That reminds me, I've always thought Sequence.__contains__().
should always be accompanied by Sequence.index(). Their
use cases are strongly related:
Good n
Martin v. Löwis wrote:
> Both. Let (a,b,c) equal gc.get_threshold(), then a full gc happens
> after a*b*c object allocations (roughly; early object deallocations
> are deducted from that number). Currently, this product is 7.
I see. 70k is a large number. Do you have some real world experience
It's interesting that tuples could be registered as Sequences without having
all the requisite methods. Should the register() method to some sort of
validation that all public methods in the ABC are in the class/type being
registered?
Raymond
___
Py
On Wed, Feb 06, 2008, Guido van Rossum wrote:
> On Feb 6, 2008 2:58 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
>>
>> I'd be happy seeing these methods added to tuple; there's no reason
>> that they would only be useful on mutable sequences.
>
> Sounds like this is the consensus. Go for it, Raymond
On Feb 6, 2008 5:21 PM, Aahz <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 06, 2008, Guido van Rossum wrote:
> > On Feb 6, 2008 2:58 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
> >>
> >> I'd be happy seeing these methods added to tuple; there's no reason
> >> that they would only be useful on mutable sequ
On Feb 6, 2008 5:17 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> It's interesting that tuples could be registered as Sequences without having
> all the requisite methods. Should the register() method to some sort of
> validation that all public methods in the ABC are in the class/type bein
> I think the Zope/Twisted interfaces have gone here before.
> I believe they have a separate validation call which is
> typically only invoked in unittests.
+1 That seems like a good idea.
Raymond
___
Python-3000 mailing list
[email protected]
Mike Meyer writes:
> Personally, I think *this* [proposal to link 2.x to 2.y for y < x]
> is a crock. But if you're going to advocate that people lie about
> what versions they have installed,
If you insist on that interpretation, consider that it's no different
from the common cc -> gcc link.
>> Both. Let (a,b,c) equal gc.get_threshold(), then a full gc happens
>> after a*b*c object allocations (roughly; early object deallocations
>> are deducted from that number). Currently, this product is 7.
>
> I see. 70k is a large number. Do you have some real world experience how
> often a a
Not from a real world application, no. If you run the program below with
And now for the program below...
Regards,
Martin
import gc,sys,time
gc.set_debug(gc.DEBUG_STATS)
t=time.time()
l = []
l.append(l)
for i in range(10):
l.append([])
del l
print >>sys.stderr,"Done looping: final gen
25 matches
Mail list logo