[Python-Dev] [RELEASE] Python 2.7.12

2016-06-27 Thread Benjamin Peterson
It is my privilege to present you with another release in the Python 2.7 series, Python 2.7.12. Since the release candidate, there were two changes: - The Windows binaries have been changed to use OpenSSL 1.0.2h. - The "about" dialog in IDLE was fixed. Downloads, as always, are on python.org:

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Steven D'Aprano
On Mon, Jun 27, 2016 at 03:47:31PM -0700, Ethan Furman wrote: > On 06/27/2016 03:20 PM, Guido van Rossum wrote: > > >The point is that it's not an error. In Andre Malo's use case, at > >least, EOFError is used as a control flow exception, not as an error. > > Like StopIteration then: only an

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Random832
On Mon, Jun 27, 2016, at 12:40, Ethan Furman wrote: > On 06/21/2016 01:48 PM, Serhiy Storchaka wrote: > > > There is a design question. If you read file in some format or with some > > protocol, and the data is ended unexpectedly, when to use general > > EOFError exception and when to use

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Ethan Furman
On 06/27/2016 03:20 PM, Guido van Rossum wrote: The point is that it's not an error. In Andre Malo's use case, at least, EOFError is used as a control flow exception, not as an error. Like StopIteration then: only an error if it escapes. -- ~Ethan~

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Guido van Rossum
The point is that it's not an error. In Andre Malo's use case, at least, EOFError is used as a control flow exception, not as an error. On Mon, Jun 27, 2016 at 3:06 PM, Ethan Furman wrote: > On 06/27/2016 02:54 PM, Greg Ewing wrote: >> >> Nikolaus Rath wrote: >>> >>> I think

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Ethan Furman
On 06/27/2016 02:54 PM, Greg Ewing wrote: Nikolaus Rath wrote: I think EOFError conveys more information. UnpicklingError can mean a lot of things, EOFError tells you the precise problem: pickle expected more data, but there was nothing left. I think EOFError should be used for EOF between

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Greg Ewing
Nikolaus Rath wrote: I think EOFError conveys more information. UnpicklingError can mean a lot of things, EOFError tells you the precise problem: pickle expected more data, but there was nothing left. I think EOFError should be used for EOF between pickles, but UnpicklingError should be used

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Ethan Furman
On 06/21/2016 01:48 PM, Serhiy Storchaka wrote: There is a design question. If you read file in some format or with some protocol, and the data is ended unexpectedly, when to use general EOFError exception and when to use format/protocol specific exception? I believe that EOFError was created

Re: [Python-Dev] When to use EOFError?

2016-06-27 Thread Nikolaus Rath
On Jun 21 2016, Serhiy Storchaka wrote: > There is a design question. If you read file in some format or with > some protocol, and the data is ended unexpectedly, when to use general > EOFError exception and when to use format/protocol specific exception? > > For example when

Re: [Python-Dev] PEP 520: Preserving Class Attribute Definition Order (round 5)

2016-06-27 Thread Armin Rigo
Hi, On 24 June 2016 at 23:52, Eric Snow wrote: > Pending feedback, the impact on Python implementations is expected to > be minimal. If a Python implementation cannot support switching to > `OrderedDict``-by-default then it can always set ``__definition_order__`` >