Coot: Difference between revisions

Jump to navigation Jump to search
3 bytes removed ,  13 March 2014
m
m (→‎Simple rules for Scheme to Python translations: changed word order for clarity)
Line 377: Line 377:
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:


# replace all '-' with '_' (except in equation when you need arithmetic '-' minus signs)
# Replace all '-' with '_' (except in equation when you need arithmetic '-' minus signs)
# move the brackets around the argument(s)
# Move the brackets around the argument(s)
# separate multiple arguments by commas rather than spaces
# Separate multiple arguments by commas rather than spaces
# replace 'define' for functions with 'def' and for assignments with an '='
# Replace 'define' with 'def' for functions and with '=' for assignments
# Make sure to use indentation for the function content [Python is indentation sensitive] and a ':' after the function definition.
# Make sure to use indentation for the function content [Python is indentation sensitive] and a ':' after the function definition.


Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu