Start implementing an is_class function that will determine if an object is a class or not in the future.
This commit is contained in:
1 parent
7f874620db
commit
c9542cbc04
2 files changed
+9
No files matched your search
@@ -54,6 +54,9 @@ class CompiledObject(Base):
|
||||
def py__bool__(self):
|
||||
return bool(self.obj)
|
||||
|
||||
def is_class(self):
|
||||
return isinstance(self.obj, type)
|
||||
|
||||
@property
|
||||
def doc(self):
|
||||
return inspect.getdoc(self.obj) or ''
|
||||
|
||||
Reference in new issue
Block a user