[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Akira Kitada

New submission from Akira Kitada:

The PEP 257 says:

   Insert a blank line before and after all docstrings (one-line or multi-line)
   that document a class


Looking at stdlib and popular open source software, I couldn't find packages 
that follow this style, so I think this is not really a convention.

--
files: pep-0257.patch
keywords: patch
messages: 229921
nosy: akitada
priority: normal
severity: normal
status: open
title: PEP 257: drop the recommendation for a blank line between the class line 
and the docstring
Added file: http://bugs.python.org/file37003/pep-0257.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread R. David Murray

R. David Murray added the comment:

I follow this recommendation.  I'm sure there are many classes in the stdlib 
that do not follow this convention, since much of the stdlib was written before 
PEP8, and we don't go back and do changesets just to fix PEP8 non-conformance 
in the stdlib.  But this is the preferred style, and new code in the stdlib 
should follow it.  Whether anyone else does is up to them.

(For that matter, there are a lot of classes in the stdlib, especially the test 
suite, where the first 'def' follows the class line with no space in between, 
and I wince every time I read such code :)

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Akira Kitada

Akira Kitada added the comment:

Guido is with me :)

On Wed, Oct 22, 2014 at 2:16 AM, Guido van Rossum guido at python.org wrote:
 I think the argument is about the blank line between the class line and
 the docstring. I agree with Akira that very few packages follow this style,
 and I think we would do well to remove this recommendation. There's no point
 in fighting the prevailing convention.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread R. David Murray

R. David Murray added the comment:

Yeah, on reflection (after I posted) I can see why people tend to leave out 
that blank line, because it is more parallel to not having a blank line after 
the 'def'.  And I don't think I've ever seen anyone do the alternate version of 
keeping things parallel by putting a blank line before the docstring if the 
method has multiple sections, despite the recommendation in the PEP to do so.

However, you then need to delete the if a method is written as a number of 
sections sentence, since it has the same problem (it is recommending a blank 
line before the docstring, which nobody does...I didn't remember that 
recommendation at all myself).

--
resolution: not a bug - 
stage: resolved - needs patch
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Akira Kitada

Akira Kitada added the comment:

Good point. I looked at some Python files but, as you pointed out,
I couldn't find ones what follow the recommendation.
In some files there is a blank line after a docstring but it seemed
it's not because it is written as a number of sections.

The patch updated.

--
resolution:  - not a bug
status: open - closed
Added file: http://bugs.python.org/file37005/pep-0257.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Guido van Rossum

Guido van Rossum added the comment:

I've applied the second version -- rev 9b715d8246db in the peps repo.

--
assignee:  - gvanrossum
nosy: +gvanrossum
resolution: not a bug - fixed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22715] PEP 257: drop the recommendation for a blank line between the class line and the docstring

2014-10-24 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage: needs patch - resolved

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22715
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com