Cleaned up string conversions of asts in python.

[Delivers #57791472]