On 2008-02-13 08:02, Andrew MacIntyre wrote:
> Christian Heimes wrote:
>> Andrew MacIntyre wrote:
>>> I tried a LIFO stack implementation (though I won't claim to have done it
>>> well), and found it slightly slower than no freelist at all. The
>>> advantage of such an approach is that the known si
Christian Heimes wrote:
> Andrew MacIntyre wrote:
>> I tested the updated patch you added to issue 2039. With the int
>> freelist set to 500 and the float freelist set to 100, its about the same
>> as the no-freelist version for my tests, but PyBench shows the simple
>> float arithmetic to be abo
I want to add test cases for int.__format__(), and I went looking for
Lib/test/test_int.py. I've added tests into Lib/test/test_long.py, so I
assumed there was an int version, but no.
Is there any particular reason for that, and are there int tests
elsewhere? If not, I'll add test_int.py, but
On 2008-02-13 12:56, Andrew MacIntyre wrote:
> I'm not that interested in debating the detail of exactly how big the
> prospective LIFO freelists are - I just want to see the situation
> resolved with maximum utilisation of memory for minimum performance
> penalty. To that end, +1 from me for acc
When backporting PEP 3101, do we want to add __format__ to classic
classes? If so, could someone give me a pointer on how to implement
this? I don't see where to hook it up.
Thanks.
Eric.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.
On Tue, Feb 12, 2008 at 08:19:27PM -0800, Guido van Rossum wrote:
> [on the 'What's New in 3.0' document]
> I think that's a good start. Andrew Kuchling can always move it later
> if that section becomes too crowded or uneven.
I won't be able to work on the 3.0 document in time for 3.0 final
(assu
M.-A. Lemburg wrote:
> On 2008-02-13 12:56, Andrew MacIntyre wrote:
>> I'm not that interested in debating the detail of exactly how big the
>> prospective LIFO freelists are - I just want to see the situation
>> resolved with maximum utilisation of memory for minimum performance
>> penalty. To t
M.-A. Lemburg wrote:
> +1 on removing the freelists from ints and floats, but not the
>small int sharing optimization
>
> +1 on focusing on improving pymalloc to handle int and float
>object allocations even better
>
> -1 on changing the freelist implementations to use pymalloc for
>a
On Feb 13, 2008 5:28 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
> When backporting PEP 3101, do we want to add __format__ to classic
> classes? If so, could someone give me a pointer on how to implement
> this? I don't see where to hook it up.
You just have to get the '__format__' attribute and c
I think most int tests are probably in test_types.py.
If you were to create test_int.py now it would probably interfere with
the renaming of test_long.py to test_int.py in the py3k branch
(eventually).
On Feb 13, 2008 4:12 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
> I want to add test cases for i
Guido van Rossum wrote:
> On Feb 13, 2008 5:28 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
>> When backporting PEP 3101, do we want to add __format__ to classic
>> classes? If so, could someone give me a pointer on how to implement
>> this? I don't see where to hook it up.
>
> You just have to get
With zsh when I try to autocomplete the ./configure options I get this:
_arguments:comparguments:303: invalid option definition:
--enable-universalsdk[SDKDIR][Build against Mac OS X 10.4u SDK (ppc/i386)]
Should this be: --enable-universalsdk[=SDKDIR] ? (Note the = )
--
Jeroen Ruigrok van der We
On Feb 13, 2008 9:48 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > On Feb 13, 2008 5:28 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
> >> When backporting PEP 3101, do we want to add __format__ to classic
> >> classes? If so, could someone give me a pointer on how to impleme
What __new__ deprecation warning?
On Feb 13, 2008 11:50 AM, Jeroen Ruigrok van der Werven
<[EMAIL PROTECTED]> wrote:
> People,
>
> where can I find rationale/background on the __new__ deprecation warning in
> 2.6 (and I assume it's totally different in 3.0)?
>
> I could not find anything about it
The 2.5 maintenance branch will be frozen tomorrow (Thursday)
around 7:00 UTC. Please don't make any changes to the branch
after that point unless you are directly involved in the release
process.
If there are any issues that you think should be considered
before the 2.5.2 release, please assign t
On Feb 12, 2008 8:39 PM, Kurt B. Kaiser <[EMAIL PROTECTED]> wrote:
> I'd say in PEP3100. Here's a patch:
>
> http://bugs.python.org/issue2092
>
The suggested patch does not actually point to any discussion or rationale
for why this change was made; it just contains a pointer to this thread
(whic
On Feb 13, 2008 9:24 AM, Jeroen Ruigrok van der Werven
<[EMAIL PROTECTED]> wrote:
> With zsh when I try to autocomplete the ./configure options I get this:
>
> _arguments:comparguments:303: invalid option definition:
> --enable-universalsdk[SDKDIR][Build against Mac OS X 10.4u SDK (ppc/i386)]
>
> S
People,
where can I find rationale/background on the __new__ deprecation warning in
2.6 (and I assume it's totally different in 3.0)?
I could not find anything about it in
http://docs.python.org/dev/3.0/whatsnew/3.0.html or
http://docs.python.org/dev/whatsnew/2.6.html
Cheers,
--
Jeroen Ruigrok
A while back, I volunteered to update asyncore and asynchat for py3k.
I posted a patch, and in response to feedback posted a more
complicated patch+modification.
Both versions have been languishing at
http://bugs.python.org/issue1563 for a couple of months now without
any further feedback or actio
On Feb 13, 2008 12:09 PM, Daniel Stutzbach
<[EMAIL PROTECTED]> wrote:
> Without the cmp argument, what's the concise way to spell something like
> "sort a list of floats by absolute value"? It'd be nice to have a stock
> example to help users rewrite their code to work with 3.0.
L.sort(key=abs)
Guido van Rossum wrote:
> On Feb 13, 2008 9:48 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
>> Guido van Rossum wrote:
>>> On Feb 13, 2008 5:28 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
When backporting PEP 3101, do we want to add __format__ to classic
classes? If so, could someone give me
On Feb 13, 2008 12:07 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
>
> Guido van Rossum wrote:
> > On Feb 13, 2008 9:48 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
> >> Guido van Rossum wrote:
> >>> On Feb 13, 2008 5:28 AM, Eric Smith <[EMAIL PROTECTED]> wrote:
> When backporting PEP 3101, do we wa
-On [20080213 21:02], Guido van Rossum ([EMAIL PROTECTED]) wrote:
>What __new__ deprecation warning?
Yes, sorry, I realized after sending that it might be a bit obtuse.
With 2.6:
DeprecationWarning: object.__new__() takes no parameters
return object.__new__(cls, uri)
--
Jeroen Ruigrok
Guido van Rossum wrote:
>> Much to my surprise, this already works:
>>
>> >>> format(oldstyle(), '+^50s')
>> '+<__main__.oldstyle instance at 0x3d91f8>+'
>> >>>
>>
>> So I guess it's a moot point. I'm using the same code as I use in 3.0,
>> where I call:
>>meth = _PyType_Lookup(Py_TY
Nick Coghlan wrote:
> Eric Smith wrote:
>> I hate to be dense, but could you point me to some code that does
>> something similar but looks up the method by name?
>
> I was going to suggest __enter__/__exit__, but that code relies mainly
> on existing opcodes and just does an attribute lookup ra
Eric Smith wrote:
> I hate to be dense, but could you point me to some code that does
> something similar but looks up the method by name?
I was going to suggest __enter__/__exit__, but that code relies mainly
on existing opcodes and just does an attribute lookup rather than
explicitly bypassin
is
often a symptom of a bug in your program.
--Guido
On Feb 13, 2008 12:19 PM, Jeroen Ruigrok van der Werven
<[EMAIL PROTECTED]> wrote:
> -On [20080213 21:02], Guido van Rossum ([EMAIL PROTECTED]) wrote:
> >What __new__ deprecation warning?
>
> Yes, sorry, I realized after
On Feb 13, 2008 2:20 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
> Nick Coghlan wrote:
> > Eric Smith wrote:
> >> I hate to be dense, but could you point me to some code that does
> >> something similar but looks up the method by name?
> >
> > I was going to suggest __enter__/__exit__, but that code
Guido van Rossum wrote:
> On Feb 13, 2008 2:20 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
>> Nick Coghlan wrote:
>>> Eric Smith wrote:
I hate to be dense, but could you point me to some code that does
something similar but looks up the method by name?
>>> I was going to suggest __enter__/_
I mistyped Jeroen's name so I edited the log message. But I got the
following error message in the process::
svn: 'post-revprop-change' hook failed; no error output available
The change still occurred, though. Anybody with access to the svn
hooks know what is going on?
-Brett
_
On Feb 13, 2008 2:57 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
>
> Guido van Rossum wrote:
> > On Feb 13, 2008 2:20 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
> >> Nick Coghlan wrote:
> >>> Eric Smith wrote:
> I hate to be dense, but could you point me to some code that does
> something si
Christian Heimes wrote:
> By the way objects are always aligned at 8 byte address boundaries. A 12
> or 4 bytes object occupies 16 bytes.
Maybe pymalloc should be enhanced so it can cope with
certain odd-sized objects, such as 12 bytes?
--
Greg
___
Pyt
[slight mailer problem, this might show up as a dupe. sorry]
Guido van Rossum wrote:
> On Feb 13, 2008 2:57 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
>> Guido van Rossum wrote:
>>> On Feb 13, 2008 2:20 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
Nick Coghlan wrote:
> However, the source cod
It's a big patch, but I'll try applying it to the current py3k branch
-- does it apply? -- and try a few things with it. I'm concerned
about how well it behaves with things like Medusa (which probably
needs its own py3k update).
Bill
___
Python-Dev mail
Christian Heimes wrote:
> By the way objects are always aligned at 8 byte address boundaries. A 12
> or 4 bytes object occupies 16 bytes.
No, with PyMalloc a 4 byte object occupies 8 bytes (see the comments at
the top of Objects/obmalloc.c).
Cheers,
Andrew.
--
-
On Feb 13, 2008 1:42 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> >> Much to my surprise, this already works:
> >>
> >> >>> format(oldstyle(), '+^50s')
> >> '+<__main__.oldstyle instance at 0x3d91f8>+'
> >> >>>
> >>
> >> So I guess it's a moot point. I'm using th
Oops, sorry for the spam. I didn't see that there were already answers
in the rest of the thread. :-(
On Feb 13, 2008 9:25 PM, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote:
> On Feb 13, 2008 1:42 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
> > Guido van Rossum wrote:
> > >> Much to my surprise, this al
They applied when posted them, but subsequent patches seem to have
broken them. I've now posted updated patches that apply cleanly
against revision 60780.
On Feb 13, 2008 6:52 PM, Bill Janssen <[EMAIL PROTECTED]> wrote:
> It's a big patch, but I'll try applying it to the current py3k branch
> -- d
> I mistyped Jeroen's name so I edited the log message. But I got the
> following error message in the process::
>
> svn: 'post-revprop-change' hook failed; no error output available
>
> The change still occurred, though. Anybody with access to the svn
> hooks know what is going on?
I have no
Try this:
if (PyInstance_Check(obj)) {
bound_method = PyObject_GetAttr(obj, str__format__);
if (!bound_method)
return NULL;
Py_DECREF(bound_method);
return
}
else {
do it the py3k way;
}
On Feb 13, 2008 5:31 PM, Eric Smith <[EMAIL PROTECTED]> wrote:
> [slight mailer problem, thi
Andrew MacIntyre wrote:
>> By the way objects are always aligned at 8 byte address boundaries. A 12
>> or 4 bytes object occupies 16 bytes.
>
> No, with PyMalloc a 4 byte object occupies 8 bytes (see the comments at
> the top of Objects/obmalloc.c).
I know. It's a typo. It should read "12 or 14 b
41 matches
Mail list logo