Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r71083:4bb8079f8c4f Date: 2014-04-29 21:21 -0400 http://bitbucket.org/pypy/pypy/changeset/4bb8079f8c4f/
Log: simplify get_module_type_name diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py --- a/pypy/objspace/std/typeobject.py +++ b/pypy/objspace/std/typeobject.py @@ -490,14 +490,11 @@ def get_module_type_name(w_self): space = w_self.space w_mod = w_self.get_module() - if not space.isinstance_w(w_mod, space.w_str): - mod = '__builtin__' - else: + if space.isinstance_w(w_mod, space.w_str): mod = space.str_w(w_mod) - if mod != '__builtin__': - return '%s.%s' % (mod, w_self.name) - else: - return w_self.name + if mod != '__builtin__': + return '%s.%s' % (mod, w_self.name) + return w_self.name def getname(w_self, space): name = w_self.name _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit