Utilities/ClassBrowsers/pyclbr.py

changeset 5651
982465f8389c
parent 5604
b047181a4a33
child 6048
82ad8ec9548c
--- a/Utilities/ClassBrowsers/pyclbr.py	Wed Mar 22 18:45:15 2017 +0100
+++ b/Utilities/ClassBrowsers/pyclbr.py	Wed Mar 22 18:50:20 2017 +0100
@@ -325,7 +325,7 @@
                 self.importedNames[name].append(lineno)
     
 
-def readmodule_ex(module, path=[], inpackage=False, isPyFile=False):
+def readmodule_ex(module, path=None, inpackage=False, isPyFile=False):
     """
     Read a module file and return a dictionary of classes.
 
@@ -353,6 +353,7 @@
         return dictionary
 
     # search the path for the module
+    path = [] if path is None else path[:]
     f = None
     if inpackage:
         try:
@@ -361,7 +362,7 @@
         except ImportError:
             f = None
     if f is None:
-        fullpath = list(path) + sys.path
+        fullpath = path[:] + sys.path[:]
         f, file, (suff, mode, type) = \
             ClassBrowsers.find_module(module, fullpath, isPyFile)
     if module.endswith(".py") and type == imp.PKG_DIRECTORY:

eric ide

mercurial