Sujet : Re: backslash in triple quoted string (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 09. May 2025, 00:07:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vvjdg9$27gfo$6@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.162 (Pokrosvk)
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