Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor authored and bivab committed Mar 19, 2013
1 parent 8386ef3 commit b353843
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions topaz/modules/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ def method_is_kind_ofp(self, space, w_mod):

@moduledef.method("instance_of?")
def method_instance_of(self, space, w_mod):
if isinstance(w_mod, W_ClassObject) or isinstance(w_mod, W_ModuleObject):
return space.newbool(space.getnonsingletonclass(self) is w_mod)
raise space.error(space.w_TypeError, "class or module required")
if not isinstance(w_mod, W_ModuleObject):
raise space.error(space.w_TypeError, "class or module required")
return space.newbool(space.getnonsingletonclass(self) is w_mod)

@moduledef.method("eval")
def method_eval(self, space, w_source):
Expand Down

0 comments on commit b353843

Please sign in to comment.