python-ast 1.0.2

A library for compiling Python to Rust
Documentation
1
2
3
4
5
6
7
8
9
10
# Test case: Complex main block - SHOULD rename main function (current behavior)
def main():
    print("Main function")
    return "result"

if __name__ == "__main__":
    print("Starting program")  # Additional code beyond just main() call
    result = main()
    print(f"Result: {result}")  # More additional code
    print("Program finished")