This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年07月12日 19:41 by skrah, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg246665 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2015年07月12日 19:41 | |
IMO the string should start at lineno=1, col_offset=0.
$ ./python
Python 3.6.0a0 (default:02b81a82a57d, Jul 12 2015, 20:33:44)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> a = ast.parse('''"""xxx
... yyy
... zzz"""''')
>>> ast.dump(a, include_attributes=True)
"Module(body=[Expr(value=Str(s='xxx\\nyyy\\nzzz', lineno=3, col_offset=-1), lineno=3, col_offset=-1)])"
|
|||
| msg254116 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2015年11月05日 16:41 | |
Victor, I'm adding you just in case this also affects your optimizer (like #25555). |
|||
| msg254738 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年11月16日 15:24 | |
This is a duplicate of issue16806 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:18 | admin | set | github: 68811 |
| 2015年11月16日 15:24:15 | serhiy.storchaka | set | status: open -> closed superseder: col_offset is -1 and lineno is wrong for multiline string expressions nosy: + serhiy.storchaka messages: + msg254738 resolution: duplicate stage: resolved |
| 2015年11月05日 16:41:30 | skrah | set | nosy:
+ vstinner |
| 2015年11月05日 16:41:20 | skrah | set | messages: + msg254116 |
| 2015年07月12日 19:42:12 | skrah | set | nosy:
+ benjamin.peterson |
| 2015年07月12日 19:41:18 | skrah | create | |