# ObjectTests.py Copyright (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-05-29 File created. # 2022-12-27 Converted to Python 3. # There is type 'object' in Python. # The built in function object() returns an object of type 'object'. class TestClass : pass some_object = object() string_object = "ABC" print( "\n type( some_object ) is %s" % type( some_object ) ) print( "\n isinstance( some_object, object ) returns %s" \ % isinstance( some_object, object ) ) print( "\n issubclass( str, object ) returns %s" \ % issubclass( str, object ) ) print( "\n issubclass( TestClass, object ) returns %s" \ % issubclass( TestClass, object ) ) print( object )