inspect tag

1 questions


1 answers
94 views
0
I want to know how to get all the classes in the current module as a list

Usually, when you get a class as a list within a module, you write it like this# foo.pyclass Foo: pass# # test.pyimport inspectimport fooFor name, obj in inspect.getmembers(foo): Get class of #foo mod...

2 years ago

© 2024 OneMinuteCode. All rights reserved.