[IPython-dev] Output of, e.g., type(a)

Warren Weckesser warren.weckesser at enthought.com
Sat Oct 22 13:49:22 EDT 2011

Hi all,

ipython is doing some magic with the output of 'type(a)' (using 0.11.rc1 in

In [1]: a = 1

In [2]: type(a)
Out[2]: int

In [3]: str(type(a))
Out[3]: "<type 'int'>"

In [4]: repr(type(a))
Out[4]: "<type 'int'>"

The output in line 2 is nicer, but it makes it appear that the builtin
'type' behaves in a way that it does not.  My attempts (possibly too brief)
to find documentation or discussion of this feature have not been fruitful.
Can anyone point me to the relevant docs, or mailing list discussions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20111022/de62ec8a/attachment.html>

More information about the IPython-dev mailing list