3 ms·
Similarly, > For instance, though functions are objects in both languages, R takes that more seriously than does Python. Whenever I work in Python, I'm annoyed
by Liquid_Fire 7y ago
Similarly,
> For instance, though functions are objects in both languages, R takes that more seriously than does Python. Whenever I work in Python, I'm annoyed by the fact that I cannot print a function to the terminal, which I do a lot in R.
I assume "print a function to the terminal" means print its source? If that is the main complaint, it is available out of the box in IPython (%psource), which if you are doing data science you are probably using already.
- dagw 7y agoThere is also the inspect module that lets you retrieve both the source code and anything else you want to know about a function.