[issue39715] Implement __repr__ methods for AST classes

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: I reject the feature request. While repr() on AST nodes could be enhanced for some specific nodes, you have to know that the code is mostly implemented in C which make enhancements non-trivial. Moreover, this code (Python/Python-ast.c) is generated by a

[issue39715] Implement __repr__ methods for AST classes

2020-10-30 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > I suggest to reject this feature request +1 -- ___ Python tracker ___ ___ Python-bugs-list

[issue39715] Implement __repr__ methods for AST classes

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that it's a good idea to make repr(_ast.AST) longer. I suggest to reject this feature request. As Serhiy wrote, ast.dump() can already be used. -- nosy: +vstinner ___ Python tracker

[issue39715] Implement __repr__ methods for AST classes

2020-02-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39715] Implement __repr__ methods for AST classes

2020-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For more informative representation you can use ast.dump(). -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue39715] Implement __repr__ methods for AST classes

2020-02-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39715] Implement __repr__ methods for AST classes

2020-02-21 Thread Ram Rachum
Ram Rachum added the comment: I understand that we have to be really careful in including information that could have unlimited size. But I think we have lots of information that isn't that way. For example, for ClassDef and FunctionDef objects, we could include the name. For Assign, we

[issue39715] Implement __repr__ methods for AST classes

2020-02-21 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: What kind of repr do you have in your mind? If the repr you are thinking contains field information, it would be no-go. Fields of AST objects can contain other objects and fields of that objects can contain more objects (this goes up to the recursion limit

[issue39715] Implement __repr__ methods for AST classes

2020-02-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +BTaskaya, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39715] Implement __repr__ methods for AST classes

2020-02-21 Thread Ram Rachum
New submission from Ram Rachum : I was playing with the `ast` library today, and it's frustrating to see objects like these: [<_ast.Import object at 0x033FB048>, <_ast.Import object at 0x033FB0F0>, <_ast.ImportFrom object at 0x033FB160>, <_ast.Import