diff --git a/Pymacs/pymacs.py.in b/Pymacs/pymacs.py.in index f6700e9..05846ab 100644 --- a/Pymacs/pymacs.py.in +++ b/Pymacs/pymacs.py.in @@ -396,31 +396,31 @@ def pymacs_load_helper(file_without_extension, prefix): if prefix is None: prefix = module_components[-1].replace('_', '-') + '-' try: - object = sys.modules.get(module_name) - if object: - reload(object) + module = sys.modules.get(module_name) + if module: + reload(module) else: try: if directory: sys.path.insert(0, directory) - object = __import__(module_name) + module = __import__(module_name) finally: if directory: del sys.path[0] # Whenever MODULE_NAME is of the form [PACKAGE.]...MODULE, # __import__ returns the outer PACKAGE, not the module. for component in module_components[1:]: - object = getattr(object, component) + module = getattr(module, component) except ImportError: return None - load_hook = object.__dict__.get('pymacs_load_hook') + load_hook = module.__dict__.get('pymacs_load_hook') if load_hook: load_hook() - interactions = object.__dict__.get('interactions', {}) + interactions = module.__dict__.get('interactions', {}) if not isinstance(interactions, dict): interactions = {} arguments = [] - for name, value in object.__dict__.items(): + for name, value in module.__dict__.items(): if callable(value) and value is not lisp: arguments.append(allocate_python(value)) arguments.append(lisp[prefix + name.replace('_', '-')]) @@ -435,12 +435,12 @@ def pymacs_load_helper(file_without_extension, prefix): if arguments: return [lisp.progn, [lisp.pymacs_defuns, [lisp.quote, arguments]], - object] - return [lisp.quote, object] + module] + return [lisp.quote, module] -def doc_string(object): - if hasattr(object, '__doc__'): - return object.__doc__ +def doc_string(function): + if hasattr(function, '__doc__'): + return function.__doc__ ## Garbage collection matters.