Beginners question
Terry Reedy
tjreedy at udel.edu
Thu Aug 30 14:22:45 EDT 2012
On 8/30/2012 9:30 AM, Oscar Benjamin wrote:
> On Thu, 30 Aug 2012 09:23:03 -0400, Dave Angel <d at davea.name> wrote:
>> I haven't discovered why sometimes the type output shows type
> instead of
>> class. There are other ways of defining classes, however, and
> perhaps
>> this is using one of them. Still, it is a class, and stat() is
>> returning an instance of that class.
>
> Builtin types show as type and classes defined in python show as class
> (even if they inherit from builtin types).
Only in 2.x, and this goes back to the old user class system, which the
OP should not have to learn about.
>>> type(1)
<class 'int'>
--
Terry Jan Reedy
More information about the Python-list
mailing list