Author pablogsal
Recipients BTaskaya, brandtbucher, levkivskyi, pablogsal
Date 2019-11-20.23:01:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
After PR17302 is merged we need to fix the following cosmetic issues indicated by Victor:

(*) unparse adds many useless parentheses. The algorithm seems naive.
For example, it adds "()" to "class _AddedDllDirectory():". It also
adds parenthesis around yield, like "(yield (top, dirs, nondirs))",
whereas the AST node was at "top level": it isn't a sub-expression.
Maybe this algortihm should be made smarter.

(*) newlines in docstring are rendered as two characters: "\" + "n"
(escaped newline: \n), rather than a newline character. I would expect
a newline, it's more common that \n... But it may "break" inline
doctests rendering... Maybe it should be an option (render newlines as
newline character or escape them?), or maybe even let the user choose
how to render them using a callback (that's related to the "pluggable
formatter" question).

(*) Indentation is hardcoded to 4 spaces. What if I want 2 spaces or
something different? Should it become an option?

(*) Float infinity is replaces with 1e309. Again, maybe someone wants
to render this differently? It sounds like an arbitrary choice (which
"works" as expected).
Date User Action Args
2019-11-20 23:01:49pablogsalsetrecipients: + pablogsal, levkivskyi, brandtbucher, BTaskaya
2019-11-20 23:01:49pablogsalsetmessageid: <>
2019-11-20 23:01:49pablogsallinkissue38870 messages
2019-11-20 23:01:48pablogsalcreate