type and object

2017-10-05 Thread Naveen Yadav
Hi folks,


>> isinstance(type, object) is True   # 1
and
>> isinstance(object, type) is True   # 2


its means type is object is type, But i am not sure how is this.

For what i can understand is 
for #1: since every thing is object in python, type is also an object.
and 
for #2: object is a base type. therefore object is type
>> object.__doc__
>> 'The most base type'


Am I understanding this correct ? Please shed light on this.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: type and object

2017-10-05 Thread Naveen Yadav
On Thursday, 5 October 2017 21:47:34 UTC+5:30, Naveen Yadav  wrote:
> Hi folks,
> 
> 
> >> isinstance(type, object) is True   # 1
> and
> >> isinstance(object, type) is True   # 2
> 
> 
> its means type is object is type, But i am not sure how is this.
> 
> For what i can understand is 
> for #1: since every thing is object in python, type is also an object.
> and 
> for #2: object is a base type. therefore object is type
> >> object.__doc__
> >> 'The most base type'
> 
> 
> Am I understanding this correct ? Please shed light on this.

thanks guys for clearing this out.
-- 
https://mail.python.org/mailman/listinfo/python-list