[Python-Dev] Long options support

2006-06-14 Thread Georg Brandl
I've just closed a bug report wishing for long option support, pointing to a patch sitting in the patch tracker implementing this. Should we accept at least the very common options --help and --version in 2.5? Georg ___ Python-Dev mailing list

Re: [Python-Dev] Long options support

2006-06-14 Thread Fredrik Lundh
Georg Brandl wrote: I've just closed a bug report wishing for long option support, pointing to a patch sitting in the patch tracker implementing this. Should we accept at least the very common options --help and --version in 2.5? Guido pronounced on this in May: Guido van Rossum

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Boris Borcic
Terry Reedy wrote: Boris Borcic [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] being transformed to profit from simplifications I expected sets to allow. There, itemwise augmented assigments in loops very naturally transform to wholesale augmented assignments without loops.

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Boris Borcic
Josiah Carlson wrote: You seem to not realize that these different use-cases. Your new example involves a global variable that is *shared* among everyone that knows about this particular module. It also is repaired by a simple insertion of 'global freebits' at the beginning of the search

[Python-Dev] High Level Virtual Machine

2006-06-14 Thread Neal Becker
I thought this announcement was interesting: http://hlvm.org/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Improve error msgs?

2006-06-14 Thread Armin Rigo
Hi Georg, On Wed, Jun 14, 2006 at 08:51:03AM +0200, Georg Brandl wrote: type_error(object does not support item assignment); It helps debugging if the object's type was prepended. Should I go through the code and try to enhance them where possible? I think it's an excellent idea. Armin

[Python-Dev] sqlite3 test errors - was : Re: [Python-checkins] r46936 - in python/trunk: Lib/sqlite3/test/regression.py Lib/sqlite3/test/types.py Lib/sqlite3/test/userfunctions.py Modules/_sqlite/conn

2006-06-14 Thread Gerhard Häring
Co-posting to python-dev in the hope of getting help of people verifying my suspicion ... Gerhard Häring wrote: [...] For some reason, they don't seem to have picked up the changed tests of the sqlite3 module. At least the error messages look exactly like the ones I had when I ran the

Re: [Python-Dev] [Python-checkins] sqlite3 test errors - was : Re: r46936 - in python/trunk: Lib/sqlite3/test/regression.py Lib/sqlite3/test/types.py Lib/sqlite3/test/userfunctions.py Modules/_sqlite/

2006-06-14 Thread Gerhard Häring
Gerhard Häring wrote: Co-posting to python-dev in the hope of getting help of people verifying my suspicion ... Gerhard Häring wrote: [...] For some reason, they don't seem to have picked up the changed tests of the sqlite3 module. At least the error messages look exactly like the ones I

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Terry Reedy
Boris Borcic [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Terry Reedy wrote: Your transformation amounted to switching from collection mutation to object rebinding. In Python, that is a crucial difference. Ok, that is a crucial difference. The question becomes : is that

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Boris Borcic
Josiah Carlson wrote: The closure/class example is merely a method of encapsulating state, which I find easier to define, describe, and document than the closure version. In the case of the code discussed, eg the actual model of def solve(problem) : freebits = set(range(N)) def

Re: [Python-Dev] Switch statement

2006-06-14 Thread M.-A. Lemburg
Thomas Lee wrote: On Mon, Jun 12, 2006 at 11:33:49PM +0200, Michael Walter wrote: Maybe switch became a keyword with the patch.. Regards, Michael That's correct. On 6/12/06, M.-A. Lemburg [EMAIL PROTECTED] wrote: Could you upload your patch to SourceForge ? Then I could add it to the

Re: [Python-Dev] [Python-checkins] sqlite3 test errors - was : Re: r46936 - in python/trunk: Lib/sqlite3/test/regression.py Lib/sqlite3/test/types.py Lib/sqlite3/test/userfunctions.py Modules/_sqlite/

2006-06-14 Thread Brett Cannon
On 6/14/06, Gerhard Häring [EMAIL PROTECTED] wrote: Co-posting to python-dev in the hope of getting help of people verifyingmy suspicion ...Gerhard Häring wrote: [...] For some reason, they don't seem to have picked up the changed tests of the sqlite3 module. At least the error messages look

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Josiah Carlson
Boris Borcic [EMAIL PROTECTED] wrote: Josiah Carlson wrote: You seem to not realize that these different use-cases. Your new example involves a global variable that is *shared* among everyone that knows about this particular module. It also is repaired by a simple insertion of

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Josiah Carlson
Boris Borcic [EMAIL PROTECTED] wrote: Josiah Carlson wrote: The closure/class example is merely a method of encapsulating state, which I find easier to define, describe, and document than the closure version. In the case of the code discussed, eg the actual model of def

Re: [Python-Dev] Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Guido van Rossum
Is it perhaps time to move this discussion to c.l.py? The behavior isn't going to change. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org

[Python-Dev] Comparing closures and arguments (was Re: Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Phillip J. Eby
At 11:26 AM 6/14/2006 -0700, Josiah Carlson wrote: Ok, so here's a bit of a benchmark for you. def helper(x,y): return y def fcn1(x): _helper = helper y = x+1 for i in xrange(x): y = _helper(x,y) def fcn2(x): y = x+1

Re: [Python-Dev] Comparing closures and arguments (was Re: Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Josiah Carlson
Phillip J. Eby [EMAIL PROTECTED] wrote: At 11:26 AM 6/14/2006 -0700, Josiah Carlson wrote: Ok, so here's a bit of a benchmark for you. def helper(x,y): return y def fcn1(x): _helper = helper y = x+1 for i in xrange(x): y =

Re: [Python-Dev] Comparing closures and arguments (was Re: Scoping vs augmented assignment vs sets (Re: 'fast locals' in Python 2.5)

2006-06-14 Thread Phillip J. Eby
At 01:00 PM 6/14/2006 -0700, Josiah Carlson wrote: That claim isn't necessarily supported by your benchmark, which includes the time to *define* the nested function 10 times, but calls it only 45 times! Try comparing fcn1(1000) and fcn2(1000) - I suspect the results will be somewhat

Re: [Python-Dev] beta1 coming real soon

2006-06-14 Thread Thomas Heller
Neal Norwitz wrote: It's June 9 in most parts of the world. The schedule calls for beta 1 on June 14. It*s June 14 no longer in too many parts of the world ;-). Any *official* news about beta1? I guess the release will not be started as long as the tests fail, but is there a new plan? Thomas

Re: [Python-Dev] [Python-checkins] sqlite3 test errors - was : Re: r46936 - in python/trunk: Lib/sqlite3/test/regression.py Lib/sqlite3/test/types.py Lib/sqlite3/test/userfunctions.py Modules/_sqlite/

2006-06-14 Thread Tim Peters
[Gerhard Häring] ... Until recently, SQLite was buggy and it was only fixed in http://www.sqlite.org/cvstrac/chngview?cn=2981 that callbacks can throw errors that are usefully returned to the original caller. The tests for the sqlite3 module currently assume a recent version SQLite

Re: [Python-Dev] [Python-checkins] sqlite3 test errors - was : Re: r46936 - in python/trunk: Lib/sqlite3/test/regression.py Lib/sqlite3/test/types.py Lib/sqlite3/test/userfunctions.py Modules/_sqlite/

2006-06-14 Thread Gerhard Häring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim Peters wrote: [Gerhard Häring] ... Until recently, SQLite was buggy and it was only fixed in http://www.sqlite.org/cvstrac/chngview?cn=2981 that callbacks can throw errors that are usefully returned to the original caller. The tests for

Re: [Python-Dev] [Python-checkins] sqlite3 test er rors - was : Re: r46936 - in python/trunk: Lib/sqlit e3/test/regression.py Lib/sqlite3/test/types.py Lib/ sqlite3/test/userfunctions.py Modules/_sqli

2006-06-14 Thread Anthony Baxter
Well, the just-released Ubuntu 06.06 LTS (Long Term Support) ships with sqlite 3.2.8. I'd suggest that whatever version ships with Python should _at_ _least_ work with this version. 06.06 is supposed to be supported for a couple of years, at least. Since this is the latest and greatest version

Re: [Python-Dev] beta1 coming real soon

2006-06-14 Thread Charles Cazabon
Thomas Heller [EMAIL PROTECTED] wrote: Neal Norwitz wrote: It's June 9 in most parts of the world. The schedule calls for beta 1 on June 14. It*s June 14 no longer in too many parts of the world ;-). Apparently it's still 1999 in some parts of the world. From your message: From:

Re: [Python-Dev] beta1 coming real soon

2006-06-14 Thread Anthony Baxter
On Saturday 01 January 2000 09:11, Thomas Heller wrote: Neal Norwitz wrote: It's June 9 in most parts of the world. The schedule calls for beta 1 on June 14. It*s June 14 no longer in too many parts of the world ;-). Any *official* news about beta1? I guess the release will not be

Re: [Python-Dev] pychecker warnings in Lib/encodings

2006-06-14 Thread Neal Norwitz
On 6/13/06, Walter Dörwald [EMAIL PROTECTED] wrote: IIUC (and I probably don't), mbcs is on windows only. But should I be able to import encodings.mbcs on Linux or is this expected? import encodings.mbcs Traceback (most recent call last): File stdin, line 1, in module File