Re: [Python-Dev] Py_Finalize does not release all memory, not even closely

2006-04-15 Thread Martin v. Löwis
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

Re: [Python-Dev] PEP 359: The "make" Statement

2006-04-15 Thread Ian D. Bollinger
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

Re: [Python-Dev] Any reason that any()/all() do not take apredicateargument?

2006-04-15 Thread Raymond Hettinger
[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

Re: [Python-Dev] PEP 359: The "make" Statement

2006-04-15 Thread Greg Ewing
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

Re: [Python-Dev] Preserving the blamelist

2006-04-15 Thread Tim Peters
[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

[Python-Dev] valgrind reports

2006-04-15 Thread Neal Norwitz
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

Re: [Python-Dev] Py_Finalize does not release all memory, not even closely

2006-04-15 Thread Tim Peters
[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

Re: [Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS

2006-04-15 Thread Tim Peters
[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

Re: [Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS

2006-04-15 Thread John J Lee
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

Re: [Python-Dev] Any reason that any()/all() do not take a predicateargument?

2006-04-15 Thread Martin v. Löwis
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

Re: [Python-Dev] Any reason that any()/all() do not take a predicateargument?

2006-04-15 Thread Bill Janssen
> >> 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: > ...

Re: [Python-Dev] Building Python with the free MS Toolkit compiler

2006-04-15 Thread Paul Moore
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

Re: [Python-Dev] Py_Finalize does not release all memory, not even closely

2006-04-15 Thread Martin v. Löwis
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

Re: [Python-Dev] Py_Finalize does not release all memory, not even closely

2006-04-15 Thread Martin v. Löwis
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

Re: [Python-Dev] Checkin 45232: Patch #1429775

2006-04-15 Thread Armin Rigo
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

Re: [Python-Dev] Checkin 45232: Patch #1429775

2006-04-15 Thread Martin v. Löwis
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

Re: [Python-Dev] Building Python with the free MS Toolkit compiler

2006-04-15 Thread Martin v. Löwis
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,

Re: [Python-Dev] Checkin 45232: Patch #1429775

2006-04-15 Thread Armin Rigo
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

Re: [Python-Dev] Any reason that any()/all() do not take a predicateargument?

2006-04-15 Thread Martin v. Löwis
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

Re: [Python-Dev] Any reason that any()/all() do not take a predicateargument?

2006-04-15 Thread Brian Quinlan
>> 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

Re: [Python-Dev] Any reason that any()/all() do not take a predicate argument?

2006-04-15 Thread Mikhail Glushenkov
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