Steve D'Aprano wrote:
> On Mon, 21 Nov 2016 11:15 pm, Veek M wrote:
>
> class Foo():
>> ... pass
>> ...
> class Bar(Foo):
>> ... pass
>> ...
> b = Bar()
> type(b)
>>
> [...]
>
>> What is going on here? Shouldn't x = EuroDate(); type(x) give
>> 'instance'?? Why is 'b' an
On Mon, 21 Nov 2016 11:15 pm, Veek M wrote:
class Foo():
> ... pass
> ...
class Bar(Foo):
> ... pass
> ...
b = Bar()
type(b)
>
[...]
> What is going on here? Shouldn't x = EuroDate(); type(x) give
> 'instance'?? Why is 'b' an 'instance' and 'x' EuroDate?
> Why isn't 'b'
>>> class Foo():
... pass
...
>>> class Bar(Foo):
... pass
...
>>> b = Bar()
>>> type(b)
>>> class Date(object):
... pass
...
>>> class EuroDate(Date):
... pass
...
>>> x = EuroDate()
>>> type(x)
What is going on here? Shouldn't x = EuroDate(); type(x) give
'instance'?? Why is 'b'