This is simply false AFAICS. There was little participation on this
particular issue during PEP 374 that I can recall. Now that it is
clearly an issue after all, it's still early in the PEP 385 process.
Martin has already picked up the ball on EOL support, and has carried
informal design
Martin v. Löwis writes:
This is simply false AFAICS. There was little participation on this
particular issue during PEP 374 that I can recall. Now that it is
clearly an issue after all, it's still early in the PEP 385 process.
Martin has already picked up the ball on EOL support, and
Neil Hodgson wrote:
Glenn Linderman:
and perhaps other things (and
are there new Unicode control characters that could be used for line
endings?),
Unicode includes Line Separator U+2028 and Paragraph Separator
U+2029 but they are rarely supported and very rarely used. They are a
pain
M.-A. Lemburg mal at egenix.com writes:
Please file a bug report for this. f.readlines() (or rather
the io layer) should be using Py_UNICODE_ISLINEBREAK(ch)
for detecting line break characters.
Actually, no. It has been designed from the start to only recognize the
standard line break
Antoine Pitrou wrote:
M.-A. Lemburg mal at egenix.com writes:
Please file a bug report for this. f.readlines() (or rather
the io layer) should be using Py_UNICODE_ISLINEBREAK(ch)
for detecting line break characters.
Actually, no. It has been designed from the start to only recognize the
Nick Coghlan wrote:
Antoine Pitrou wrote:
M.-A. Lemburg mal at egenix.com writes:
Please file a bug report for this. f.readlines() (or rather
the io layer) should be using Py_UNICODE_ISLINEBREAK(ch)
for detecting line break characters.
Actually, no. It has been designed from the start to
M.-A. Lemburg wrote:
Nick Coghlan wrote:
Antoine Pitrou wrote:
M.-A. Lemburg mal at egenix.com writes:
Please file a bug report for this. f.readlines() (or rather
the io layer) should be using Py_UNICODE_ISLINEBREAK(ch)
for detecting line break characters.
Actually, no. It has been
P.J. Eby wrote:
At 05:59 PM 8/5/2009 -0700, Raymond Hettinger wrote:
[Jeffrey E. McAninch, PhD]
I very often want something like a try-except conditional expression
similar
to the if-else conditional.
An example of the proposed syntax might be:
x = float(string) except float('nan')
or
M.-A. Lemburg mal at egenix.com writes:
What I don't understand is why the io layer tries to reinvent
the wheel here instead of just using the codec's .readline()
method - which *does* use .splitlines() and has full support
for all Unicode line break characters (including the CRLF
On Thu, Aug 6, 2009 at 4:47 AM, Nick Coghlanncogh...@gmail.com wrote:
Option 2:
x = float(string) except ValueError: float('nan')
op(float(string) except ValueError: float('nan'))
This has the virtue of closely matching the statement syntax, but
embedding colons inside expressions is
Raymond Hettinger python at rcn.com writes:
For example:
x = min(seq) except ValueError else 0 # default to zero for empty
sequences
How about:
x = min(seq) if seq else 0
Shorter and more readable (except X else Y isn't very logical).
sample_std_deviation = sqrt(sum(x - mu
Antoine Pitrou wrote:
M.-A. Lemburg mal at egenix.com writes:
What I don't understand is why the io layer tries to reinvent
the wheel here instead of just using the codec's .readline()
method - which *does* use .splitlines() and has full support
for all Unicode line break characters
On 6 Aug 2009, at 00:22 , Jeff McAninch wrote:
I'm new to this list, so please excuse me if this topic has been
discussed, but I didn't
see anything similar in the archives.
I very often want something like a try-except conditional expression
similar
to the if-else conditional.
I fear this
Nick Coghlan wrote:
P.J. Eby wrote:
At 05:59 PM 8/5/2009 -0700, Raymond Hettinger wrote:
[Jeffrey E. McAninch, PhD]
I very often want something like a try-except conditional expression
similar
to the if-else conditional.
An example of the proposed syntax might be:
x = float(string) except
M.-A. Lemburg mal at egenix.com writes:
Sure, but the code for line splitting is not really all that
complicated (see PyUnicode_Splitlines()), so could easily
be adapted to work on buffers directly.
Certainly indeed. It all comes down to compatibility with the original
implementation.
(PEP
What about catching specific error numbers? Maybe an option so that
the dictionary elements can also be dictionaries with integers as the
keys:
filedata = try_3(open, randomfile, except = { IOError, {2: None} } )
If it isn't found in the dictionary, then we raise the error.
On Thu, Aug 6,
Hello python-dev!
I'm a Python programmer, but this is the first time I'm posting on
python-dev, and I am not familiar at all with how the Python implementation
works -- so this post may be way off.
I've recently released a Python application,
PythonTurtlehttp://pythonturtle.com,
which is
cool-RR wrote:
Hello python-dev!
I'm a Python programmer, but this is the first time I'm posting on
python-dev, and I am not familiar at all with how the Python
implementation works -- so this post may be way off.
I've recently released a Python application, PythonTurtle
Why do you need to keep the whole Python distribution under version
control? Isn't all you need a script to *generate* the py2exe'd output from
an *installed* Python? This is the approach I take with Movable Python which
does something very similar.
Never mind the source control issue, it's
In article d28975e8-6706-4515-9c9e-fb7f90775...@masklinn.net,
Xavier Morel catch-...@masklinn.net wrote:
On 6 Aug 2009, at 00:22 , Jeff McAninch wrote:
I'm new to this list, so please excuse me if this topic has been
discussed, but I didn't
see anything similar in the archives.
I
On option 1 is this legal then?
x = float(string) except float('nan') if some_check() else float('inf') if
ValueError
-Original Message-
From: python-dev-bounces+dinov=microsoft@python.org
[mailto:python-dev-bounces+dinov=microsoft@python.org] On Behalf Of Nick
Coghlan
Sent:
I added http://bugs.python.org/issue6654
I also put a not to python-ideas but have had no response yet. Any comments?
Here's the summary:
I've created http://codereview.appspot.com/100046 on Rietveld:
by passing the path component of the xmlrpc request to the dispatch
method, itbecomes
M.-A. Lemburg:
... and because of this, the feature is already available if
you use codecs.open() instead of the built-in open():
So should I not add an issue for the basic open because codecs.open
should be used for this case?
Neil
___
MRAB wrote:
Dino Viehland wrote:
On option 1 is this legal then?
x = float(string) except float('nan') if some_check() else float('inf') if
ValueError
Well, is this is legal?
try:
x = float(string)
except some_check():
x = float('nan')
except
Dino Viehland wrote:
MRAB wrote:
Dino Viehland wrote:
On option 1 is this legal then?
x = float(string) except float('nan') if some_check() else float('inf') if
ValueError
Well, is this is legal?
try:
x = float(string)
except some_check():
x = float('nan')
25 matches
Mail list logo