Anthony Sottile <asott...@umich.edu> added the comment:

hitting this in https://bugs.python.org/issue36917?

Is the simplification here really worth the breaking change to consumers?

I now have to write something that's essentially this to work around this which 
feels more like the complexity has just been pushed to users instead of the 
stdlib:


def visit_Constant(self, node):
    if isinstance(node.value, str):
        self.visit_Str(node)
    elif isinstance(node.value, bytes):
        self.visit_Bytes(node)
    elif node.value in {True, False}:
        self.visit_NameConstant(node)
    elif node.value is Ellipsis:
        self.visit_Ellipsis(node)
    elif isinstance(node.value, (int, float)):
        self.visit_Num(node)
    else:
        # etc...

----------
nosy: +Anthony Sottile

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

Reply via email to