• Re: backslash in triple quoted string (Posting On Python-ListProhibited)

    From Lawrence D'Oliveiro@ldo@nz.invalid to comp.lang.python on Thu May 8 23:07:54 2025
    From Newsgroup: comp.lang.python

    I mostly don’t bother with triple-quoted strings. I think they’re
    badly designed.

    Here’s an example of what my docstrings look like:

    class Matrix :
    "representation of a 3-by-2 affine homogeneous matrix. This does not" \
    " actually use any Cairo routines to implement its calculations; these" \
    " are done entirely using Python numerics. The from_cairo and to_cairo" \
    " methods provide conversion to/from cairo_matrix_t structs. Routines" \
    " elsewhere expect this Matrix type where the underlying Cairo routine" \
    " wants a cairo_matrix_t, and return this type where the Cairo routine" \
    " returns a cairo_matrix_t."

    ...

    #end Matrix
    --- Synchronet 3.21a-Linux NewsLink 1.2