[New-bugs-announce] [issue36917] ast.NodeVisitor no longer calls visit_Str

Anthony Sottile report at bugs.python.org
Tue May 14 10:21:22 EDT 2019


New submission from Anthony Sottile <asottile at umich.edu>:

More fallout from the Constant change in https://bugs.python.org/issue32892

minimal reproduction:


import ast


class V(ast.NodeVisitor):
    def visit_Str(self, node):
        print(node.s)


def main():
    V().visit(ast.parse('x = "hi"'))


if __name__ == '__main__':
    exit(main())


$ python3.7 t.py
hi
$ python3.8 t.py
$ python3.8 --version --version
Python 3.8.0a4 (default, May  8 2019, 01:43:53) 
[GCC 7.4.0]

----------
components: Library (Lib)
messages: 342463
nosy: Anthony Sottile, serhiy.storchaka
priority: normal
severity: normal
status: open
title: ast.NodeVisitor no longer calls visit_Str
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36917>
_______________________________________


More information about the New-bugs-announce mailing list