John Snow <js...@redhat.com> writes:

[...]

> Until then, docstrings should use triple-double quotes. Any other
> string can use whatever quoting style happens to be most convenient
> for the string being written to minimize escaping. Consistency is nice
> where reasonable, but minimizing escapes by using different styles on
> an as-needed basis is a respectable and good thing.
>
> I glanced *very quickly* at these files and it looks like the style is
> to use double quotes for format strings and single quotes for constant
> strings. That seems fine to me.

I agree, and so does PEP 8:

    String Quotes

    In Python, single-quoted strings and double-quoted strings are the
    same.  This PEP does not make a recommendation for this.  Pick a
    rule and stick to it.  When a string contains single or double quote
    characters, however, use the other one to avoid backslashes in the
    string.  It improves readability.

    For triple-quoted strings, always use double quote characters to be
    consistent with the docstring convention in PEP 257.

[...]


Reply via email to