Variable: python-fill-docstring-style
python-fill-docstring-style is a customizable variable defined in
python.el.gz.
Value
pep-257
Documentation
Style used to fill docstrings.
This affects python-fill-string behavior with regards to
triple quotes positioning.
Possible values are django, onetwo, pep-257, pep-257-nn,
symmetric, and nil. A value of nil won't care about quotes
position and will treat docstrings a normal string, any other
value may result in one of the following docstring styles:
django:
"""
Process foo, return bar.
"""
"""
Process foo, return bar.
If processing fails throw ProcessingError.
"""
onetwo:
"""Process foo, return bar."""
"""
Process foo, return bar.
If processing fails throw ProcessingError.
"""
pep-257:
"""Process foo, return bar."""
"""Process foo, return bar.
If processing fails throw ProcessingError.
"""
pep-257-nn:
"""Process foo, return bar."""
"""Process foo, return bar.
If processing fails throw ProcessingError.
"""
symmetric:
"""Process foo, return bar."""
"""
Process foo, return bar.
If processing fails throw ProcessingError.
"""
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defcustom python-fill-docstring-style 'pep-257
"Style used to fill docstrings.
This affects `python-fill-string' behavior with regards to
triple quotes positioning.
Possible values are `django', `onetwo', `pep-257', `pep-257-nn',
`symmetric', and nil. A value of nil won't care about quotes
position and will treat docstrings a normal string, any other
value may result in one of the following docstring styles:
`django':
\"\"\"
Process foo, return bar.
\"\"\"
\"\"\"
Process foo, return bar.
If processing fails throw ProcessingError.
\"\"\"
`onetwo':
\"\"\"Process foo, return bar.\"\"\"
\"\"\"
Process foo, return bar.
If processing fails throw ProcessingError.
\"\"\"
`pep-257':
\"\"\"Process foo, return bar.\"\"\"
\"\"\"Process foo, return bar.
If processing fails throw ProcessingError.
\"\"\"
`pep-257-nn':
\"\"\"Process foo, return bar.\"\"\"
\"\"\"Process foo, return bar.
If processing fails throw ProcessingError.
\"\"\"
`symmetric':
\"\"\"Process foo, return bar.\"\"\"
\"\"\"
Process foo, return bar.
If processing fails throw ProcessingError.
\"\"\""
:type '(choice
(const :tag "Don't format docstrings" nil)
(const :tag "Django's coding standards style." django)
(const :tag "One newline and start and Two at end style." onetwo)
(const :tag "PEP-257 with 2 newlines at end of string." pep-257)
(const :tag "PEP-257 with 1 newline at end of string." pep-257-nn)
(const :tag "Symmetric style." symmetric))
:group 'python
:safe (lambda (val)
(memq val '(django onetwo pep-257 pep-257-nn symmetric nil))))