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
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
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
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 ?!
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.
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
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
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
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
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
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
[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
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
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
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
[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 :-)
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
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
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
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
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?
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
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
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) ==
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
41 matches
Mail list logo