New submission from Batuhan <batuhanosmantask...@gmail.com>:

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.

----------
components: Library (Lib)
messages: 358850
nosy: BTaskaya, pablogsal
priority: normal
severity: normal
status: open
title: Adding funcitonality to determine if a constant string node is triple 
quoted
type: enhancement
versions: Python 3.9

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

Reply via email to