Tim Peters wrote:
> Because new-style classes create cycles that Py_Finalize() doesn't
> clean up, it may make analysis easier to stick a PyGC_Collect() call
> (or two! repeat until it returns 0) inside the loop now.
I'm shy to do this: the comment in Py_Finalize suggests that things
will break i
Greg Ewing wrote:
> I don't like the position of the name being defined.
> It should be straight after the opening keyword, as
> with 'def' and 'class'. This makes it much easier
> to search for definitions of things, both by eyeball
> and editor search functions, etc.
>
>
Also, all other defini
[Bill Janssen]
> Yeah, but you can't do more complicated expressions that way, like
>
> any(lambda x: x[3] == "thiskey")
You're not making any sense. The sequence argument is not listed and the
lambda
is unnecessary. Try this instead:
any(x[3] == 'thiskey' for x in seq)
> I think
Steven Bethard wrote:
>make :
>
I don't like the position of the name being defined.
It should be straight after the opening keyword, as
with 'def' and 'class'. This makes it much easier
to search for definitions of things, both by eyeball
and editor search functions, etc.
--
Greg
[Tim]
>> All the trunk buildbots started failing about 5 hours ago, in
>> test_parser. There have been enough checkins since then that the
>> boundary between passing and failing is about to scroll off forever.
[Martin]
> It's not lost, though; it's just not displayed anymore. It would be
> possi
This was run on linux amd64. It would be great to run purify on
windows and other platforms. If you do, please report back here, even
if nothing was found. That would be a good data point.
Summary of tests with problems:
test_codecencodings_jp (1 invalid read)
test_coding (1 invalid read)
test
[Martin]
> Running Py_Initialize/Py_Finalize once leaves 2150 objects behind (on
> Linux). The second run adds 180 additional objects; each subsequent
> run appears to add 156 more.
One thing I notice is that they're all > 0 :-) I believe that, at one
time, the second and subsequent numbers were
[John J Lee]
...
> You mentioned use of '...' / ELLIPSIS, IIRC, so I assumed that would work
> -- but it seems not, from your latest post (that I'm replying to here).
Different context -- answering why IGNORE_EXCEPTION_DETAIL exists
given that ELLIPSIS can do everything it does (provided you don't
On Sat, 15 Apr 2006, Tim Peters wrote:
[...]
> [also John]
>> Sorry, please ignore the post of mine I'm replying to here.
>>
>> I missed part of the thread, and Tim has already answered my question...
>
> That's news to Tim ;-)
You mentioned use of '...' / ELLIPSIS, IIRC, so I assumed that would w
Bill Janssen wrote:
> Yeah, but you can't do more complicated expressions that way, like
>
> any(lambda x: x[3] == "thiskey")
Not /quite/ sure what this is intended to mean, but most likely,
you meant
any(x[3]=="thiskey" for x in seq)
> I think it makes a lot of sense for any and a
> >> seq = [1,2,3,4,5]
> >> if any(seq, lambda x: x==5):
> >> ...
> >>
> >> which is clearly more readable than
> >>
> >> reduce(seq, lambda x,y: x or y==5, False)
> >
> > How about this?
> >
> > if any(x==5 for x in seq):
>
> Aren't all of these equivalent to:
>
> if 5 in seq:
> ...
On 4/15/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Paul Moore wrote:
> > I've just added some instructions on how to build Python on Windows
> > with the free MS Toolkit C++ compiler. They are at
> > http://wiki.python.org/moin/Building_Python_with_the_free_MS_C_Toolkit.
>
> Cool! If you th
Martin v. Löwis wrote:
> Tim Peters wrote:
>> Well, there may well be a bug (or multiple bugs) underlying that one
>> too. It's one thing for Py_Finalize() not to release all memory (it
>> doesn't and probably never will), but it's not necessarily the same
>> thing if running Py_Initialize() ... P
Tim Peters wrote:
> Well, there may well be a bug (or multiple bugs) underlying that one
> too. It's one thing for Py_Finalize() not to release all memory (it
> doesn't and probably never will), but it's not necessarily the same
> thing if running Py_Initialize() ... Py_Finalize() repeatedly keeps
Hi Martin,
On Sat, Apr 15, 2006 at 11:30:07AM +0200, "Martin v. L?wis" wrote:
> Armin Rigo wrote:
> > For what it's worth, it still works on Linux (Gentoo/i386), insofar as
> > it always worked -- which is that we need either to "make install" or to
> > tweak /etc/ld.so.conf to let the executable
Armin Rigo wrote:
> For what it's worth, it still works on Linux (Gentoo/i386), insofar as
> it always worked -- which is that we need either to "make install" or to
> tweak /etc/ld.so.conf to let the executable find libpython2.5.so.
I usually set LD_LIBRARY_PATH in the shell where I want to use a
Paul Moore wrote:
> I've just added some instructions on how to build Python on Windows
> with the free MS Toolkit C++ compiler. They are at
> http://wiki.python.org/moin/Building_Python_with_the_free_MS_C_Toolkit.
Cool! If you think that adding/changing files in Python would simplify
the process,
Hi Simon,
On Thu, Apr 13, 2006 at 06:43:09PM +0200, Simon Percivall wrote:
> Building SVN trunk with --enable-shared has been broken on Mac OS X
> Intel
> since rev. 45232 a couple of days ago. I can't say if this is the case
> anywhere else as well. What happens is simply that ld can't find the
Brian Quinlan wrote:
>>> if any(seq, lambda x: x==5):
>> if any(x==5 for x in seq):
>
> Aren't all of these equivalent to:
>
> if 5 in seq:
> ...
There should be one-- and preferably only one --obvious way to do it.
Regards,
Martin
___
Pytho
>> seq = [1,2,3,4,5]
>> if any(seq, lambda x: x==5):
>> ...
>>
>> which is clearly more readable than
>>
>> reduce(seq, lambda x,y: x or y==5, False)
>
> How about this?
>
> if any(x==5 for x in seq):
Aren't all of these equivalent to:
if 5 in seq:
...
?
Cheers,
Brian
Andrew Koenig acm.org> writes:
> How about this?
>
> if any(x==5 for x in seq):
Cool! Thank you.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/o
21 matches
Mail list logo