astunparse icon indicating copy to clipboard operation
astunparse copied to clipboard

Use __class__.__name__ for boolops lookup

Open dbieber opened this issue 7 years ago • 2 comments

cmpops, binops, and unops already used this technique, but boolops did not. The reason this technique is preferred to using class for the lookup is that when working with e.g. gast (a cross version compatible AST) the exact type match required by the class lookup fails (since gast.And != ast.And), whereas the name based lookup works fine.

dbieber avatar Feb 23 '18 23:02 dbieber

The failure is in Python 3.6 only self.check_roundtrip('f"{key:4}={value!s}"').

Thoughts on why my change breaks this?

dbieber avatar Feb 28 '18 18:02 dbieber

Rebased.

dbieber avatar Oct 01 '18 01:10 dbieber