1
0
forked from VimPlug/jedi

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:
Dave Halter
2014-08-20 11:43:25 +02:00
parent 7f874620db
commit c9542cbc04
2 changed files with 9 additions and 0 deletions

View File

@@ -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 ''