Batuhan Taskaya <batuhanosmantask...@gmail.com> added the comment:

@serhiy.storchaka, with these ASDL signatures, I have a patch that would omit 
default values for both Nones and [] in case they are redundant. But this is a 
bit different than your approach so I wanted to ask what's your opinion about 
adding an extra argument called omit_defaults, and only omit defaults it 
present. I'm adding this because unlike your first patch, these aren't actually 
defaults when creating the objects (like ast.Module(body=[x]) != 
ast.Module(body=[x], type_ignores=[])) so doing anything other than looking to 
that representation would be different than the actual result. What're your 
opinions about this? (I'm submitting the initial version of the patch before 
doing a PR)

----------
Added file: https://bugs.python.org/file48975/ast.patch

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

Reply via email to