[rb-general] Addresses in (I)Python output
Chris Lamb
lamby at debian.org
Mon Sep 23 08:38:07 UTC 2019
Hi Rebecca,
> In Python, objects that don't have an explicit string representation
> have a default one that includes their memory address, which is very
> likely to vary from run to run:
>
> >>> lambda x: x
> <function <lambda> at 0x7f80c9f937b8>
[…]
> (a) Modify the documentation to not print these objects (if they're
> IPython automatically printing the last line's result, adding ";" to the
> end of the line suppresses it)
>
> or (b) Run a search-and-replace to change them to something fixed:
Unfortunately these two solutions require changes to both existing
documentation as well as future documentation that has yet to be
written. Would it not therefore be more sensible to modify Sphinx
itself (or similar) to do this for us?
Not only are upstream are amenable to such changes — I have sent a
number of not dissimilar pull requests to that project — this way we
can fix the entire problem in one fell swoop without any potentially
ugly special-casing and playing "whack-a-mole" with software that is
introduced into Debian later.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org 🍥 chris-lamb.co.uk
`-
More information about the rb-general
mailing list