Joakim Soderlund added the comment: I got slightly confused here while playing around.
Python 3.6.0 (default, Jan 31 2017, 11:39:39) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class Huacaya: ... f"""Huacaya!""" ... >>> class Suri: ... f"""{'Suri!'}""" ... >>> Huacaya.__doc__ is None False >>> Suri.__doc__ is None True At first I thought f-strings *did* work as docstrings since it worked just fine for the first class. But, the docstring suddenly vanished when putting an actual expression into it. ---------- nosy: +JockeTF _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28739> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com