Hello,

Currently, a f-string is not recognized as a docstring:

>>> class C: f"foo"
>>> C.__doc__
>>> 

This means you need to use a (admittedly easy) workaround:

>>> class C: __doc__ = f"foo"
>>> C.__doc__
'foo'

Shouldn't the former be allowed for convenience?

Regards

Antoine.


_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/UALMEMQ4QW7W4HE2PIBARWYBKFWJZFB4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to