Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread Steven D'Aprano
On Fri, 7 Aug 2009 08:22:14 pm Kristján Valur Jónsson wrote: > Unless I am very much mistaken, this is the approach Ruby takes. > Everything is an expression. For example, the value of a block is > the value of The last expression in the block. Copying what other languages do is not necessarily a

[Python-Dev] www, svn.python.org down

2009-08-07 Thread A.M. Kuchling
Both www.python.org and svn.python.org are down. They're hosted on the same machine, and it seems to have run into disk problems and hasn't rebooted even after power-cycling. Thomas Wouters will be visiting the machine physically tomorrow to try to diagnose the problem. (The machine also hosts p

[Python-Dev] socket.makefile and EINTR handling

2009-08-07 Thread Gregory P. Smith
In particular this issue: http://bugs.python.org/issue1628205 I believe we should handle EINTR internally within the socket._fileobject wrapper as nobody using a file-like object should ever expect to get an EINTR. EINTR only comes from using the lowest level system calls. Anyone strongly disag

[Python-Dev] Summary of Python tracker Issues

2009-08-07 Thread Python tracker
ACTIVITY SUMMARY (07/31/09 - 08/07/09) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 2315 open (+39) / 16175 closed (+16) / 18490 total (+55) Open issues with patches: 919 Average

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread Alex Martelli
2009/8/7 Kristján Valur Jónsson : > Unless I am very much mistaken, this is the approach Ruby takes. > Everything is an expression.  For example, the value of a block is the value > of > The last expression in the block. > > I've never understood the need to have a distinction betwen statements an

Re: [Python-Dev] PEP 385: the eol-type issue

2009-08-07 Thread M.-A. Lemburg
Antoine Pitrou wrote: > M.-A. Lemburg egenix.com> writes: >> >> IMHO, it would be a lot better to add full Unicode support >> for line breaks to the io layer. Given that the code for the >> complicated handling of the CRLF combination is already there, >> it's not difficult to add support for the

Re: [Python-Dev] PEP 385: the eol-type issue

2009-08-07 Thread Antoine Pitrou
M.-A. Lemburg egenix.com> writes: > > IMHO, it would be a lot better to add full Unicode support > for line breaks to the io layer. Given that the code for the > complicated handling of the CRLF combination is already there, > it's not difficult to add support for the remaing line break > charact

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread Michael Foord
-- http://www.ironpythoninaction.com On 7 Aug 2009, at 12:06, ilya wrote: I believe people now discuss this both on python-dev and python-ideas, though since I'm new to both lists, I can't really tell where this belongs. It definitely belongs on the ideas list... Michael I played a

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread ilya
I believe people now discuss this both on python-dev and python-ideas, though since I'm new to both lists, I can't really tell where this belongs. I played a little with this syntax, my try_ function and @catch decorator (which are at http://mit.edu/~unknot/www/try_cond.py): # x = float(str

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread MRAB
Jeff McAninch wrote: Should be legal, right?, since syntax would be except if Dino Viehland wrote: On option 1 is this legal then? x = float(string) except float('nan') if some_check() else float('inf') if ValueError Thinking more about the syntax options: if P.J.'s "if" Option is u

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread Kristján Valur Jónsson
Unless I am very much mistaken, this is the approach Ruby takes. Everything is an expression. For example, the value of a block is the value of The last expression in the block. I've never understood the need to have a distinction betwen statements and expressions, not when expressions can have

Re: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)

2009-08-07 Thread Jeff McAninch
Should be legal, right?, since syntax would be except if Dino Viehland wrote: On option 1 is this legal then? x = float(string) except float('nan') if some_check() else float('inf') if ValueError Thinking more about the syntax options: if P.J.'s "if" Option is used, it should also be

Re: [Python-Dev] Tkinter has many files

2009-08-07 Thread Michael Foord
Terry Reedy wrote: 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

Re: [Python-Dev] PEP 385: the eol-type issue

2009-08-07 Thread M.-A. Lemburg
Neil Hodgson wrote: > 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? Like Antoine mentioned: Using