On Tue, Feb 26, 2013 at 9:00 PM, Albert-Jan Roskam <[email protected]> wrote:
> > > The core developers are too busy to be hand-holding a newbie who > > doesn't know any Python, > > Well, in a way they *can*: I find it very inspiring to read the source > code of Python (the .py files), though I don't do this as often as I should. > > What I like about R: if I do 'print(func)' (or fix(func)), it prints the > source code of the function. It would be cool if Python had something > similar. Instead Python prints the not-so-informative <function func at > 0xa82fae4> > > I don't think you'd want the generic 'print' to do this (though repr() might be a good candidate). In any case, IPython can do it with %psource: http://ipython.org/ipython-doc/rel-0.10.2/html/interactive/tutorial.html#explore-your-objects
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
