Am 10.03.2014 22:22, schrieb Barry Warsaw:
On Mar 10, 2014, at 12:02 PM, Andreas Röhler wrote:

currently formatting tqs with py-docstring-style is called, if tqs is below a
class or def.

OTOH tqs are also used at beginning of file or other place in sense of a
info/docstring.

What about to apply docstring-styles every times a tqs is formatted?

Yes, I think so, but only if the tqs is in an actual docstring location.
E.g. the following is not a docstring:

def foo():
     x = """
     This is
     not a
     docstring.
     """

Note also that both PEP 257 and PEP 8 have been modified to make it clear that
PEP-257-NN is the recommended style.  I'm not sure if it's the python-mode
default, but it probably should be.

It is.


Cheers,
-Barry


Okay, thanks.

So I'll implement it that way: treat as docstring, if beginning-of-string 
equals py-beginning-of-statement (?)
_______________________________________________
Python-mode mailing list
Python-mode@python.org
https://mail.python.org/mailman/listinfo/python-mode

Reply via email to