Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Ben Finney
Antoine Pitrou writes: > I don't always find it easy to summarize a function in one line. Difficulty in coming up with an accurate one-line summary of the intent of a function is a code smell: the function probably needs to be simplified so it is easier to describe accurately. This is, IMO, one

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread Nick Coghlan
On 28 Jun 2013 07:51, "Eric Snow" wrote: > > On Thu, Jun 27, 2013 at 9:35 AM, Ethan Furman wrote: > > On 06/27/2013 08:18 AM, Eric Snow wrote: > >> Good points. In either case there is no definition order available. > >> I'm okay with that. Would it be better to represent that as None (and > >>

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread Nick Coghlan
On 28 Jun 2013 07:46, "PJ Eby" wrote: > > On Thu, Jun 27, 2013 at 4:48 AM, Nick Coghlan wrote: > > I'd be tempted to kill PEP 422 as not worth the hassle if we did this. > > I assume you mean the "namespace" keyword part of PEP 422, since PEP > 422's class initialization feature is entirely ortho

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Alexander Belopolsky
On Thu, Jun 27, 2013 at 10:20 AM, Guido van Rossum wrote: > On Thu, Jun 27, 2013 at 1:21 AM, Antoine Pitrou > wrote: > > I don't always find it easy to summarize a function in one line. > > Neither do I. But I always manage to do it anyway. +1 If you cannot summarize what your function does i

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread Eric Snow
On Thu, Jun 27, 2013 at 9:35 AM, Ethan Furman wrote: > On 06/27/2013 08:18 AM, Eric Snow wrote: >> Good points. In either case there is no definition order available. >> I'm okay with that. Would it be better to represent that as None (and >> the attribute is always defined) or by having the att

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread PJ Eby
On Thu, Jun 27, 2013 at 4:48 AM, Nick Coghlan wrote: > I'd be tempted to kill PEP 422 as not worth the hassle if we did this. I assume you mean the "namespace" keyword part of PEP 422, since PEP 422's class initialization feature is entirely orthogonal to definition order or namespace customizati

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Terry Reedy
On 6/27/2013 12:57 PM, Guido van Rossum wrote: It was never my intention to enforce that everything has a docstring. Just that if it does, it looks good. Ok, I won't add them when a function's name actually makes what it does obvious. But when I have to spend at least a few minutes reading the

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Guido van Rossum
It was never my intention to enforce that everything has a docstring. Just that if it does, it looks good. On Thu, Jun 27, 2013 at 9:40 AM, Terry Reedy wrote: > On 6/27/2013 11:57 AM, Guido van Rossum wrote: >> >> Yes on one line, capitalized, period. No on single sentence. > > > Complete and cor

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Terry Reedy
On 6/27/2013 11:57 AM, Guido van Rossum wrote: Yes on one line, capitalized, period. No on single sentence. Complete and correct docstrings are somewhat rare in idlelib. About half are missing. Single lines typically omit the period. Multiple lines often omit the blank line after the first. I

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread Ethan Furman
On 06/27/2013 08:18 AM, Eric Snow wrote: On Thu, Jun 27, 2013 at 2:48 AM, Nick Coghlan wrote: I think the main concern I would have is whether other implementations are happy they can provide a suitable ordered dictionary for class namespace execution. It's also worth considering what would ha

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Guido van Rossum
Yes on one line, capitalized, period. No on single sentence. --Guido van Rossum (sent from Android phone) On Jun 27, 2013 8:17 AM, "Larry Hastings" wrote: > On 06/26/2013 08:56 PM, Guido van Rossum wrote: > > PEP 257 says this on the formatting of multi-line docstrings: > > """ > Multi-line doc

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Larry Hastings
On 06/26/2013 08:56 PM, Guido van Rossum wrote: PEP 257 says this on the formatting of multi-line docstrings: """ Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by au

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread Eric Snow
On Thu, Jun 27, 2013 at 2:48 AM, Nick Coghlan wrote: > I think the main concern I would have is whether other implementations > are happy they can provide a suitable ordered dictionary for class > namespace execution. > > It's also worth considering what would have to happen for dynamically > crea

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Guido van Rossum
On Thu, Jun 27, 2013 at 1:21 AM, Antoine Pitrou wrote: > I don't always find it easy to summarize a function in one line. Neither do I. But I always manage to do it anyway. My reasoning is, you can always leave out more detail and add it to the subsequent paragraph. -- --Guido van Rossum (pytho

Re: [Python-Dev] [Python-checkins] peps: Reject PEP 315.

2013-06-27 Thread Łukasz Langa
On 27 cze 2013, at 00:51, Nick Coghlan wrote: > On 27 Jun 2013 03:12, "Łukasz Langa" wrote: > > This was a mention of an alternative possible syntax. I don't feel it was > > worth keeping this particular one while not discussing any other > > alternatives at all. If you'd rather keep this infor

Re: [Python-Dev] Classes with ordered namespaces

2013-06-27 Thread Nick Coghlan
On 27 June 2013 16:03, Eric Snow wrote: > There are two relevant class namespaces in this proposal: definition > namespace and __dict__. Currently both are dicts. > > For class definition namespaces, I'd like to make the default an > OrderedDict. With the implementation in issue16991, the change

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-27 Thread Antoine Pitrou
Le Wed, 26 Jun 2013 18:56:10 -0700, Guido van Rossum a écrit : > PEP 257 says this on the formatting of multi-line docstrings: > > """ > Multi-line docstrings consist of a summary line just like a one-line > docstring, followed by a blank line, followed by a more elaborate > description. The summ