Message358850
I was working on a preceding system for AST unparser and @pablogsal said there is an issue with docstrings (they printed in the same line even it was like 1000 chars long). So determining something is a triple quoted or not is simple with preceding system but I think it would be better if we can do it simpler and public.
What I am thinking is using col_offset and end_col_offset information to determine if a string is a triple quoted or not. With a function called `ast.is_triple_quoted` or `ast.get_quote_count` etc.
I can submit a patch if this wanted.I dont think this is big enough to discuss it on python-ideas but if it is, then I'm happy to port discussion over there. |
|
Date |
User |
Action |
Args |
2019-12-24 15:24:49 | BTaskaya | set | recipients:
+ BTaskaya, pablogsal |
2019-12-24 15:24:49 | BTaskaya | set | messageid: <1577201089.29.0.516911847589.issue39132@roundup.psfhosted.org> |
2019-12-24 15:24:49 | BTaskaya | link | issue39132 messages |
2019-12-24 15:24:48 | BTaskaya | create | |
|