Re: [Python-Dev] 2.5 and beyond

2006-07-02 Thread Phillip J. Eby
At 01:58 PM 7/2/2006 +0200, [EMAIL PROTECTED] wrote: I believe the problem has nothing to do with how many scopes a block/function definition has, but with what the lambda does with the scope it's given. Currently it remembers the block and looks up the nescessary variables in it when it's

[Python-Dev] Another 2.5 bug candidate?

2006-07-02 Thread A.M. Kuchling
http://www.python.org/sf/1488934 argues that Python's use of fwrite() has incorrect error checking; this most affects file.write(), but there are other uses of fwrite() in the core. It seems fwrite() can return N bytes written even if an error occurred, and the code needs to also check

[Python-Dev] Another 2.5 bug candidate?

2006-07-02 Thread Nick Maclaren
A.M. Kuchling [EMAIL PROTECTED] wrote: http://www.python.org/sf/1488934 argues that Python's use of fwrite() has incorrect error checking; this most affects file.write(), but there are other uses of fwrite() in the core. It seems fwrite() can return N bytes written even if an error

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-02 Thread Ka-Ping Yee
On Sat, 1 Jul 2006, Andrew Koenig wrote: I'd rather see a simpler rule: = never defines a variable in a surrounding scope. If you want to affect the binding of such a variable, you have to define it explicitly in the scope in which you want it. Example: x = 42 def f():

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-02 Thread Greg Ewing
Josiah Carlson wrote: If the only code that benefits from such changes are very *simple*, then I think that says something about its necessity. The point is that they're only very simple if you can write them using access to an outer scope. Without that ability, they become less simple, less

Re: [Python-Dev] 2.5 and beyond

2006-07-02 Thread Greg Ewing
Giovanni Bajo wrote: I believe that names in lambdas/nested-functions referring to local names in the outer scope should really be bound at function definition time No, you don't want that, because it would make functions that call each other very awkward to arrange. And it's also handy that

Re: [Python-Dev] 2.5 and beyond

2006-07-02 Thread Greg Ewing
Tim Peters wrote: Scheme has no loops in Python's sense -- things like do are shorthand for expressing stylized recursion But it does have foreach and map, which are the moral equivalent of Python's for-loops and list comprehensions. The body is a lambda which takes the loop variable as a

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-07-02 Thread Jack Diederich
On Tue, Jun 27, 2006 at 02:09:19PM -0400, Alexander Belopolsky wrote: Setobject code allocates several internal objects on the heap that are cleaned up by the PySet_Fini function. This is a fine design choice, but it often makes debugging applications with embedded python more difficult. I

[Python-Dev] bug #1513646

2006-07-02 Thread Yi Ding
Hi guys, I filed this bug but sourceforge is down so I can't update it: http://sourceforge.net/tracker/index.php?func=detailaid=1513646group_id=5470atid=105470 Basically, os.access returns the wrong result for W_OK, and that's because instead of using it uses to see if the file is read only.

[Python-Dev] DRAFT: python-dev summary for 2006-06-01 to 2006-06-15

2006-07-02 Thread Steven Bethard
Here's the summary for the first half of June. Thanks in advance for your comments and corrections! = Announcements = --- Python 2.5 schedule --- Python 2.5 is moving steadily towards its next release. See `PEP 356`_ for more details

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-02 Thread Josiah Carlson
Greg Ewing [EMAIL PROTECTED] wrote: Josiah Carlson wrote: If the only code that benefits from such changes are very *simple*, then I think that says something about its necessity. The point is that they're only very simple if you can write them using access to an outer scope. Without

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-02 Thread Guido van Rossum
On 7/3/06, Josiah Carlson [EMAIL PROTECTED] wrote: Greg Ewing [EMAIL PROTECTED] wrote: Josiah Carlson wrote: If the only code that benefits from such changes are very *simple*, then I think that says something about its necessity. The point is that they're only very simple if you