21 lines
268 B
Python
21 lines
268 B
Python
|
try:
|
||
|
type('abc', None, None)
|
||
|
except TypeError:
|
||
|
print(True)
|
||
|
else:
|
||
|
print(False)
|
||
|
|
||
|
try:
|
||
|
type('abc', (), None)
|
||
|
except TypeError:
|
||
|
print(True)
|
||
|
else:
|
||
|
print(False)
|
||
|
|
||
|
try:
|
||
|
type('abc', (1,), {})
|
||
|
except TypeError:
|
||
|
print(True)
|
||
|
else:
|
||
|
print(False)
|