The lib2to3 is pretty lackluster in various regards. I believe the stdlib ast module will do better. @telaviv (skrisman) has expressed some interest in taking this on "if it's not too hard".