Emanuel Barry added the comment:

I think f-strings should be valid as docstrings. I don't know the exact 
details, but I think it would be harder to prevent rather than allow them. It 
would be exactly the same as doing func.__doc__ = func.__doc__.format(foo=foo, 
bar=bar)

It probably wouldn't be useful in most cases, but I don't see why we should 
restrict the use of f-strings to non-docstrings (not counting users trying to 
do that and stumbling across this error).

----------
nosy: +ebarry

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25179>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to