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 type, value: to except type as value: 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

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 type, value: to except type as value: so that things like except TypeError, ValueError: will do what is expected? +1. Fits well with the current use of as. Georg

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. [Greg] Why not just

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 ?!

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 thing.

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

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

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 executable

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

[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

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. If the

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 tonight or

[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.html and

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 interpretation may

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 Thomas: py2exe

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] [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 suggest to

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 arch-dep/twisted, we never find the module arch-indep/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

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

2006-03-16 Thread Baptiste Carvello
Greg Ewing a écrit : except type as value: what about except type with value: a program dies with an error message, not as an error message. ciao, BC ___ Python-Dev mailing list Python-Dev@python.org

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 multiple

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 type, value: to except type as value: so that things like except TypeError, ValueError: will do what is expected?

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] 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 the page

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] 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

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 are you

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

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 to

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] 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 arch-dep/twisted, we never find the module arch-indep/twisted/web. If my analysis (guess) is correct, I think we have a problem with the module search. That is quite possible. I keep

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

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 class

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

2006-03-16 Thread Greg Ewing
Baptiste Carvello wrote: what about except type with value: 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] 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 it a

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 type with value: 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

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,

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

2006-03-16 Thread skip
Greg except type as value: Baptiste except type with value: 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

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 type with value: 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

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 '(expr as var)' for generic expr's we'd make a lot of people pining for

[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] 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 methods for a