Re: [Python-Dev] Python Library Reference top page too long

2006-03-16 Thread Georg Brandl
Greg Ewing wrote: > Russell E. Owen wrote: > >> Fundamentally I think what's wanted is: >> - Another level of sub-TOCs, e.g. one for "Sequence Types", "Mapping >> Types", etc. Every page that has sub-topics or intimately related should >> have a list of them at the beginning. >> - The special me

[Python-Dev] Weekly Python Patch/Bug Summary

2006-03-16 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 392 open ( +6) / 3094 closed ( +5) / 3486 total (+11) Bugs: 907 open (+18) / 5646 closed (+10) / 6553 total (+28) RFE : 213 open ( +1) / 202 closed ( +1) / 415 total ( +2) New / Reopened Patches __ new exit

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Alex Martelli
On Mar 16, 2006, at 7:30 PM, Brett Cannon wrote: ... > I agree. "as" is taking on the use of assignment in statements that > are not ``=`` and I say we just keep on with that. Plus Greg's above Hmmm, if we allowed '( as )' for generic expr's we'd make a lot of people pining for 'assignmen

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Ron Adam
Greg Ewing wrote: > Baptiste Carvello wrote: > >> what about >> >> except with : >> >> a program dies "with" an error message, not "as" an error message. > > No. The exception object you're catching *is* the value, > not something which *has* a value. I maintain that "as" > is the correct w

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Brett Cannon
On 3/16/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > Baptiste Carvello wrote: > > > what about > > > > except with : > > > > a program dies "with" an error message, not "as" an error message. > > No. The exception object you're catching *is* the value, > not something which *has* a value. I ma

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread skip
Greg> except as : Baptiste> except with : Can I catch multiple exceptions with a single value in this case? Today, I write: try: foo() except (TypeError, KeyError), msg: print msg Either of the above seem like they'd require me to repeat the value, e.g:

Re: [Python-Dev] Still looking for volunteer to run Windows buildbot

2006-03-16 Thread Mark Hammond
> So PythonWin needs to be installed on a Windows buildbot slave, right? FWIW, we are having reasonable success with buildbot service packaged as a py2exe application - just unzip into a directory and go! This has the primary advantage (to me!) of not using the Python installed on the box, thereb

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Terry Reedy
"Greg Ewing" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Baptiste Carvello wrote: > >> what about >> >> except with : >> >> a program dies "with" an error message, not "as" an error message. > > No. The exception object you're catching *is* the value, > not something which

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Guido van Rossum
On 3/16/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > BTW, is anyone else bothered that the term "bytes object" > is a bit cumbersome? Also confusing as to whether it's > singular or plural. Could we perhaps call it a bytevector > or bytearray or something? Doesn't really bother me. You could call i

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Greg Ewing
Baptiste Carvello wrote: > what about > > except with : > > a program dies "with" an error message, not "as" an error message. No. The exception object you're catching *is* the value, not something which *has* a value. I maintain that "as" is the correct word to use here. Greg __

Re: [Python-Dev] Python Library Reference top page too long

2006-03-16 Thread Greg Ewing
Russell E. Owen wrote: > Fundamentally I think what's wanted is: > - Another level of sub-TOCs, e.g. one for "Sequence Types", "Mapping > Types", etc. Every page that has sub-topics or intimately related should > have a list of them at the beginning. > - The special methods for a given type of c

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Greg Ewing
Baptiste Carvello wrote: > They are not *that* obvious. Logical operations on ints have allowed users to > forget about size (and shoot themselves in the foot from time to time). Or is > 1^(~1) == -1 obvious ? Well, maybe that's not sane either :-) It's about as sane as you can get in a world wh

Re: [Python-Dev] Problem with module loading on multi-arch?

2006-03-16 Thread Neal Becker
"Martin v. Löwis" wrote: > Neal Becker wrote: >> I'm guessing that what's happening is that since there is an >> /twisted, we never find the module /twisted/web. >> If my analysis (guess) is correct, I think we have a problem with the >> module search. > > That is quite possible. I keep applying

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Josiah Carlson
Baptiste Carvello <[EMAIL PROTECTED]> wrote: > Josiah Carlson a écrit : > > > They aren't considered because they are *obvious* to most (if not all) > > sane people who use Python. > > They are not *that* obvious. Logical operations on ints have allowed users to > forget about size (and shoot

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Greg Ewing
Christos Georgiou wrote: > Well, what's the result of > > bytes([1,0,0])^ bytes([1,0]) > > ? Is it bytes([0,0,0]) (à la little-endian) or is it bytes([1,1,0]) > (straight conversion to base-256)? Or perhaps throw a ValueError if the > sizes differ? In the interests of refusing the temptation

Re: [Python-Dev] [Python-checkins] r43041 - python/trunk/Modules/_ctypes/cfield.c

2006-03-16 Thread Martin v. Löwis
M.-A. Lemburg wrote: > Since this change is going to affect a lot of 3rd party extensions, > I'd also like to see a complete list of public APIs that changed and > how they changed (including the type slots) You can construct this list easily by comparing the header files of the previous and the c

Re: [Python-Dev] [Python-checkins] r43041 - python/trunk/Modules/_ctypes/cfield.c

2006-03-16 Thread M.-A. Lemburg
Thomas Heller wrote: > Martin v. Löwis wrote: >> Thomas Heller wrote: >>> BTW: Is a "porting guide" to make extension modules compatible with 2.5 >>> available somewhere? PEP 353 scratches only the surface... >> Wrt. ssize_t changes, PEP 353 is meant to be comprehensive. Which >> particular aspect

Re: [Python-Dev] Making staticmethod objects callable?

2006-03-16 Thread Nicolas Fleury
Guido van Rossum wrote: > There's no need to change Python so that people coming from other > languages won't make silly mistakes, is there? Is that really a mistake... Yes, it's a mistake since staticmethod is a descriptor, but isn't it in a sense an implementation detail, particularly for a n

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Baptiste Carvello
Josiah Carlson a écrit : > They aren't considered because they are *obvious* to most (if not all) > sane people who use Python. They are not *that* obvious. Logical operations on ints have allowed users to forget about size (and shoot themselves in the foot from time to time). Or is 1^(~1) ==

Re: [Python-Dev] Python Library Reference top page too long

2006-03-16 Thread Edward Loper
Martin v. Löwis wrote: > Edward C. Jones wrote: >> The contents page for the Python Library Reference >> ("http://docs.python.org/dev/lib/lib.html";) has become much too long. > > I disagree. It serves my purposes very well: I usually search in the > page for a keywork I think should be there. If

Re: [Python-Dev] Python Library Reference top page too long

2006-03-16 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Edward C. Jones" <[EMAIL PROTECTED]> wrote: > The contents page for the Python Library Reference > ("http://docs.python.org/dev/lib/lib.html";) has become much too long. I > suggest that it should be designed like the top page for portal web > sites. For exampl

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Barry Warsaw
On Thu, 2006-03-16 at 12:02 +0100, Fredrik Lundh wrote: > a) sys.executable points to the executable that was used to load the > Python interpreter library/dll. > > this use is supported by the docstring and the implementation, and is > quite > common in the wild. an application

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Greg Ewing <[EMAIL PROTECTED]> wrote: > For Py3k, any thoughts on changing the syntax of > the except clause from > >except , : > > to > >except as : > > so that things like > >except TypeError, ValueError: > > will do what is expected? Brillian

Re: [Python-Dev] Python Library Reference top page too long

2006-03-16 Thread Martin v. Löwis
Edward C. Jones wrote: > The contents page for the Python Library Reference > ("http://docs.python.org/dev/lib/lib.html";) has become much too long. I disagree. It serves my purposes very well: I usually search in the page for a keywork I think should be there. If the page was broken into multipl

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Baptiste Carvello
Greg Ewing a écrit : >except as : > what about except with : a program dies "with" an error message, not "as" an error message. ciao, BC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Problem with module loading on multi-arch?

2006-03-16 Thread Martin v. Löwis
Neal Becker wrote: > I'm guessing that what's happening is that since there is an > /twisted, we never find the module /twisted/web. If > my analysis (guess) is correct, I think we have a problem with the module > search. That is quite possible. I keep applying patches from people who claim to kn

Re: [Python-Dev] [Python-checkins] r43041 - python/trunk/Modules/_ctypes/cfield.c

2006-03-16 Thread Thomas Heller
Martin v. Löwis wrote: > Thomas Heller wrote: >> BTW: Is a "porting guide" to make extension modules compatible with 2.5 >> available somewhere? PEP 353 scratches only the surface... > > Wrt. ssize_t changes, PEP 353 is meant to be comprehensive. Which > particular aspect are you missing? I sugge

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Ulrich Berning
Fredrik Lundh schrieb: >how about this alternative ? (extended (b)). > >d) If Python was started from a standard Python interpreter, >sys.executable contains the full path to this interpreter. If not, >or if the path could not be determined, sys.executable is set to >None. > >

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Phillip J. Eby
At 07:40 PM 3/16/2006 +0100, Fredrik Lundh wrote: >Looks like I might have to withdraw my (d) proposal, and, once again, suggest >that we stick to the "GetProgramFullPath" sense, as implemented, and add a >new variable for the originally intended but not really implemented "GetInter- >preterPath" s

Re: [Python-Dev] Still looking for volunteer to run Windows buildbot

2006-03-16 Thread Tim Peters
[Trent Mick, on changing test_winsound to expect RuntimeError on a box without a sound card] > Done now (finally). Cool -- thanks! I merged that to the 2.4 branch, and (of course) your buildbot slave passes the tests on that too now. Green is a lovely color :-) _

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Fredrik Lundh
> > > a) sys.executable points to the executable that was used to load the > > > Python interpreter library/dll. > > > > > > this use is supported by the docstring and the implementation, and is > > > quite > > > common in the wild. an application using this interpretation may Th

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Trent Mick
> Fredrik Lundh wrote: > > a) sys.executable points to the executable that was used to load the > > Python interpreter library/dll. > > > > this use is supported by the docstring and the implementation, and is > > quite > > common in the wild. an application using this interpreta

[Python-Dev] Python Library Reference top page too long

2006-03-16 Thread Edward C. Jones
The contents page for the Python Library Reference ("http://docs.python.org/dev/lib/lib.html";) has become much too long. I suggest that it should be designed like the top page for portal web sites. For example see "http://www.dmoz.org/";. I suggest that "lib.html" be replaced by "lib_index.htm

Re: [Python-Dev] Still looking for volunteer to run Windows buildbot

2006-03-16 Thread Trent Mick
[Trent Mick wrote] > [Martin v. Loewis wrote] > > Tim Peters wrote: > > > I'd say instead that they should never be skipped: the real > > > difference on your box is the expected _outcome_ in the third > > > category. > > > > That is indeed more reasonable than what I proposed. > > I'll do this

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Josiah Carlson
"Christos Georgiou" <[EMAIL PROTECTED]> wrote: > Well, what's the result of > > bytes([1,0,0])^ bytes([1,0]) > > ? Is it bytes([0,0,0]) (à la little-endian) or is it bytes([1,1,0]) > (straight conversion to base-256)? Or perhaps throw a ValueError if the > sizes differ? It's a ValueError. I

[Python-Dev] Problem with module loading on multi-arch?

2006-03-16 Thread Neal Becker
I just installed TwistedSumo-2006-02-12 on x86_64, and noticed a problem. It installs arch-dep stuff into /usr/lib64/python2.4/site-packages/twisted, and arch-indep into /usr/lib/python2.4/site-packages/twisted as it should. But: from twisted.web import html exceptions.ImportError: No modul

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Fred L. Drake, Jr.
Guido van Rossum wrote: > Can you say more about the motivation for wanting this reinterpreted? Fredrik Lundh wrote: > d) If Python was started from a standard Python interpreter, My understanding matches Guido's description, so I'm not sure any changes are needed. Since an embedding appl

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Thomas Heller
Fredrik Lundh wrote: > the definition of sys.executable is a bit unclear, something that has led to > incompatible use in deployed code. > > the docstring for sys.executable says "pathname of this Python interpreter", > which can be interpreted as either > > a) sys.executable points to the ex

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Fredrik Lundh
Guido van Rossum wrote: > For finding related files, sys.exec_prefix and sys.prefix should be used except that they're defined in terms of where the standard library is: prefix -- prefix used to find the Python library exec_prefix -- prefix used to find the machine-specific Python librar

Re: [Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Guido van Rossum
When I added this my intention was a mixture of (b) and (c) -- I wasn't thinking of situations where there was a difference. (If you remember Python's very early history, embedding wasn't something I had anticipated -- hence the "Great Renaming".) The use that I had in mind does things like os.sys

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Michael Urman
On 3/16/06, Georg Brandl <[EMAIL PROTECTED]> wrote: > +1. Fits well with the current use of "as". I like it, but wonder about the false parallels below. My initial reaction is it's not worth worrying about as it's easy to learn as part of the import or except statements, and should do the right th

Re: [Python-Dev] Switch to MS VC++ 2005 ?!

2006-03-16 Thread Christos Georgiou
"M.-A. Lemburg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Microsoft has recently released their express version of the Visual C++. > Given that this version is free for everyone, wouldn't it make sense > to ship Python 2.5 compiled with this version ?! > >http://msdn.micro

Re: [Python-Dev] bytes thoughts

2006-03-16 Thread Christos Georgiou
"Greg Ewing" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Baptiste Carvello wrote: > [Baptiste] >> while manipulating binary data will happen mostly with bytes objects, >> some >> operations are better done with ints, like the bit manipulations with the >> &|~^ >> operators. [Gre

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Georg Brandl
Greg Ewing wrote: > For Py3k, any thoughts on changing the syntax of > the except clause from > >except , : > > to > >except as : > > so that things like > >except TypeError, ValueError: > > will do what is expected? +1. Fits well with the current use of "as". Georg __

[Python-Dev] towards a stricter definition of sys.executable

2006-03-16 Thread Fredrik Lundh
the definition of sys.executable is a bit unclear, something that has led to incompatible use in deployed code. the docstring for sys.executable says "pathname of this Python interpreter", which can be interpreted as either a) sys.executable points to the executable that was used to load the

Re: [Python-Dev] Py3k: Except clause syntax

2006-03-16 Thread Nick Coghlan
Greg Ewing wrote: > For Py3k, any thoughts on changing the syntax of > the except clause from > >except , : > > to > >except as : > > so that things like > >except TypeError, ValueError: > > will do what is expected? +1 here I actually had a go at figuring how to do this a long