mirror of
https://github.com/python/cpython.git
synced 2025-07-14 06:45:17 +00:00

* Move Lib/unittest/test/ to Lib/test/test_unittest/ * Remove Lib/test/test_unittest.py * Replace unittest.test with test.test_unittest * Remove unittest.load_tests() * Rewrite unittest __init__.py and __main__.py * Update build system, CODEOWNERS, and wasm_assets.py
16 lines
268 B
Python
16 lines
268 B
Python
target = {'foo': 'FOO'}
|
|
|
|
|
|
def is_instance(obj, klass):
|
|
"""Version of is_instance that doesn't access __class__"""
|
|
return issubclass(type(obj), klass)
|
|
|
|
|
|
class SomeClass(object):
|
|
class_attribute = None
|
|
|
|
def wibble(self): pass
|
|
|
|
|
|
class X(object):
|
|
pass
|