On Tue, Apr 13, 2021 at 8:57 AM Jaime <enopa...@gmail.com> wrote: > > Hi all. Line 102 of https://github.com/python/peps/blob/master/pep2html.py > says: > > print(__doc__ % globals(), file=out) > > and I've just spent all day trying to understand "__doc__ % > globals()".
The docstring for any function, class, or module, is available under the name __doc__. It's a string, so what you're seeing is simply an example of string formatting/interpolation, with the docstring containing markers that get populated by globals. ChrisA -- https://mail.python.org/mailman/listinfo/python-list