1.1 --- a/modules.py Sat Feb 04 15:35:58 2017 +0100
1.2 +++ b/modules.py Sat Feb 04 16:28:15 2017 +0100
1.3 @@ -20,7 +20,8 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -from common import get_builtin_module, init_item, remove_items, CommonModule
1.8 +from common import get_builtin_class, get_builtin_module, init_item, \
1.9 + remove_items, CommonModule
1.10 from encoders import decode_modifier_term, decode_usage, encode_modifiers, encode_usage
1.11 from referencing import decode_reference, Reference
1.12 from results import ResolvedNameRef
1.13 @@ -301,15 +302,13 @@
1.14
1.15 "Return a reference to the actual object providing 'name'."
1.16
1.17 - # NOTE: This makes assumptions about the __builtins__ structure.
1.18 -
1.19 - modname = get_builtin_module(name)
1.20 - module_name = "__builtins__.%s" % modname
1.21 + objpath = get_builtin_class(name)
1.22 + module_name = get_builtin_module(name)
1.23
1.24 if self.name != module_name:
1.25 self.queue_module(module_name, True)
1.26
1.27 - return Reference("<class>", "__builtins__.%s.%s" % (modname, name))
1.28 + return Reference("<class>", objpath)
1.29
1.30 def get_object(self, path, defer=True):
1.31