[Tutor] There's a Programmer in Me

Hugo Arts hugo.yoshi at gmail.com
Tue Feb 26 23:31:23 CET 2013

On Tue, Feb 26, 2013 at 9:00 PM, Albert-Jan Roskam <fomcl at yahoo.com> 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:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130226/e6f80944/attachment.html>

More information about the Tutor mailing list