V
VanceE
Just curious.
type([]) == type(())
is False as expected
and
assert type([]) == type(())
throws an AssertionError as expected.
However the following is not an error
for x in []:
assert type(x) == type(())
I expected an AssertionError but get no errors at all.
Any explaination?
BTW I'm using Python2.5 and tried
type(None) == type(())
which is False as expected.
TIA
type([]) == type(())
is False as expected
and
assert type([]) == type(())
throws an AssertionError as expected.
However the following is not an error
for x in []:
assert type(x) == type(())
I expected an AssertionError but get no errors at all.
Any explaination?
BTW I'm using Python2.5 and tried
type(None) == type(())
which is False as expected.
TIA