Re: backslash in triple quoted string (Posting On Python-List Prohibite
From Lawrence D'Oliveiro@21:1/5 to All on Thu May 8 23:07:54 2025
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."