Mercurial > cpython-lru_cache-weakref
annotate Lib/linecache.py @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | 8c8d40ce5ca1 |
| children |
| rev | line source |
|---|---|
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
1 """Cache lines from files. |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
2 |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
3 This is intended to read lines from modules imported -- hence if a filename |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
4 is not found, it will look down the module search path for a file by |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
5 that name. |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
6 """ |
| 566 | 7 |
|
722
57e94eba2484
Search through the module search path.
Guido van Rossum <guido@python.org>
parents:
566
diff
changeset
|
8 import sys |
| 566 | 9 import os |
| 10 | |
|
29680
4e1a47f5204c
Whitespace normalization.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
23625
diff
changeset
|
11 __all__ = ["getline", "clearcache", "checkcache"] |
|
16198
32755b456369
a few more modules get __all__
Skip Montanaro <skip@pobox.com>
parents:
15543
diff
changeset
|
12 |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
13 def getline(filename, lineno, module_globals=None): |
|
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
14 lines = getlines(filename, module_globals) |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
15 if 1 <= lineno <= len(lines): |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
16 return lines[lineno-1] |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
17 else: |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
18 return '' |
| 566 | 19 |
| 20 | |
| 21 # The cache | |
| 22 | |
| 23 cache = {} # The cache | |
| 24 | |
| 25 | |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
26 def clearcache(): |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
27 """Clear the cache entirely.""" |
| 566 | 28 |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
29 global cache |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
30 cache = {} |
| 566 | 31 |
| 32 | |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
33 def getlines(filename, module_globals=None): |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
34 """Get the lines for a file from the cache. |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
35 Update the cache if it doesn't contain an entry for this file already.""" |
| 566 | 36 |
|
23620
a1de0bab5475
SF 563203. Replaced 'has_key()' with 'in'.
Raymond Hettinger <python@rcn.com>
parents:
23029
diff
changeset
|
37 if filename in cache: |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
38 return cache[filename][2] |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
39 else: |
| 37594 | 40 return updatecache(filename, module_globals) |
| 566 | 41 |
| 42 | |
|
33839
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
43 def checkcache(filename=None): |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
44 """Discard cache entries that are out of date. |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
45 (This is not checked upon each call!)""" |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
46 |
|
33839
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
47 if filename is None: |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
48 filenames = cache.keys() |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
49 else: |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
50 if filename in cache: |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
51 filenames = [filename] |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
52 else: |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
53 return |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
54 |
|
4dd97c37c2cc
SF #737473: Show up-to-date source code in tracebacks always.
Hye-Shik Chang <hyeshik@gmail.com>
parents:
29680
diff
changeset
|
55 for filename in filenames: |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
56 size, mtime, lines, fullname = cache[filename] |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
57 if mtime is None: |
|
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
58 continue # no-op for files loaded via a __loader__ |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
59 try: |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
60 stat = os.stat(fullname) |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
61 except os.error: |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
62 del cache[filename] |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
63 continue |
|
23625
65cf478950ff
Replaced obsolete stat module constants with equivalent attributes
Raymond Hettinger <python@rcn.com>
parents:
23620
diff
changeset
|
64 if size != stat.st_size or mtime != stat.st_mtime: |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
65 del cache[filename] |
| 566 | 66 |
| 67 | |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
68 def updatecache(filename, module_globals=None): |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
69 """Update a cache entry and return its list of lines. |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
70 If something's wrong, print a message, discard the cache entry, |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
71 and return an empty list.""" |
| 566 | 72 |
|
23620
a1de0bab5475
SF 563203. Replaced 'has_key()' with 'in'.
Raymond Hettinger <python@rcn.com>
parents:
23029
diff
changeset
|
73 if filename in cache: |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
74 del cache[filename] |
|
61827
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
75 if not filename or (filename.startswith('<') and filename.endswith('>')): |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
76 return [] |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
77 |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
78 fullname = filename |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
79 try: |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
80 stat = os.stat(fullname) |
|
61827
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
81 except OSError: |
|
54350
acc07866b233
Merged revisions 72319-72320,72467,72661,72675-72679,72703,72708,72710,72712,72801-72802,72820,72822,72824,72826-72828,72830 via svnmerge from
Georg Brandl <georg@python.org>
parents:
50162
diff
changeset
|
82 basename = filename |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
83 |
|
37581
b112d8c7988c
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
37576
diff
changeset
|
84 # Try for a __loader__, if available |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
85 if module_globals and '__loader__' in module_globals: |
|
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
86 name = module_globals.get('__name__') |
|
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
87 loader = module_globals['__loader__'] |
| 37594 | 88 get_source = getattr(loader, 'get_source', None) |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
89 |
|
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
90 if name and get_source: |
|
50162
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
91 try: |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
92 data = get_source(name) |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
93 except (ImportError, IOError): |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
94 pass |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
95 else: |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
96 if data is None: |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
97 # No luck, the PEP302 loader cannot find the source |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
98 # for this module. |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
99 return [] |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
100 cache[filename] = ( |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
101 len(data), None, |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
102 [line+'\n' for line in data.splitlines()], fullname |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
103 ) |
|
4264cf00a75c
Merged revisions 67750-67751 via svnmerge from
Nick Coghlan <ncoghlan@gmail.com>
parents:
38790
diff
changeset
|
104 return cache[filename][2] |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
105 |
|
54350
acc07866b233
Merged revisions 72319-72320,72467,72661,72675-72679,72703,72708,72710,72712,72801-72802,72820,72822,72824,72826-72828,72830 via svnmerge from
Georg Brandl <georg@python.org>
parents:
50162
diff
changeset
|
106 # Try looking through the module search path, which is only useful |
|
acc07866b233
Merged revisions 72319-72320,72467,72661,72675-72679,72703,72708,72710,72712,72801-72802,72820,72822,72824,72826-72828,72830 via svnmerge from
Georg Brandl <georg@python.org>
parents:
50162
diff
changeset
|
107 # when handling a relative filename. |
|
acc07866b233
Merged revisions 72319-72320,72467,72661,72675-72679,72703,72708,72710,72712,72801-72802,72820,72822,72824,72826-72828,72830 via svnmerge from
Georg Brandl <georg@python.org>
parents:
50162
diff
changeset
|
108 if os.path.isabs(filename): |
|
acc07866b233
Merged revisions 72319-72320,72467,72661,72675-72679,72703,72708,72710,72712,72801-72802,72820,72822,72824,72826-72828,72830 via svnmerge from
Georg Brandl <georg@python.org>
parents:
50162
diff
changeset
|
109 return [] |
|
37576
d11366f7e1e7
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby <pje@telecommunity.com>
parents:
33839
diff
changeset
|
110 |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
111 for dirname in sys.path: |
|
17977
2a94bf235daa
Patch from Gordon McMillan.
Tim Peters <tim.peters@gmail.com>
parents:
16198
diff
changeset
|
112 # When using imputil, sys.path may contain things other than |
|
2a94bf235daa
Patch from Gordon McMillan.
Tim Peters <tim.peters@gmail.com>
parents:
16198
diff
changeset
|
113 # strings; ignore them when it happens. |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
114 try: |
|
17977
2a94bf235daa
Patch from Gordon McMillan.
Tim Peters <tim.peters@gmail.com>
parents:
16198
diff
changeset
|
115 fullname = os.path.join(dirname, basename) |
|
2a94bf235daa
Patch from Gordon McMillan.
Tim Peters <tim.peters@gmail.com>
parents:
16198
diff
changeset
|
116 except (TypeError, AttributeError): |
|
2a94bf235daa
Patch from Gordon McMillan.
Tim Peters <tim.peters@gmail.com>
parents:
16198
diff
changeset
|
117 # Not sufficiently string-like to do anything useful with. |
|
61827
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
118 continue |
|
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
119 try: |
|
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
120 stat = os.stat(fullname) |
|
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
121 break |
|
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
122 except os.error: |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
123 pass |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
124 else: |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
125 return [] |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
126 try: |
|
61827
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
127 with open(fullname, 'rU') as fp: |
|
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
128 lines = fp.readlines() |
|
8c8d40ce5ca1
simplify and modernize updatecache()
Benjamin Peterson <benjamin@python.org>
parents:
61823
diff
changeset
|
129 except IOError: |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
130 return [] |
|
61822
f05d2996776e
ensure the last line has a trailing newline #8782
Benjamin Peterson <benjamin@python.org>
parents:
54350
diff
changeset
|
131 if lines and not lines[-1].endswith('\n'): |
|
f05d2996776e
ensure the last line has a trailing newline #8782
Benjamin Peterson <benjamin@python.org>
parents:
54350
diff
changeset
|
132 lines[-1] += '\n' |
|
23625
65cf478950ff
Replaced obsolete stat module constants with equivalent attributes
Raymond Hettinger <python@rcn.com>
parents:
23620
diff
changeset
|
133 size, mtime = stat.st_size, stat.st_mtime |
|
11706
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
134 cache[filename] = size, mtime, lines, fullname |
|
b6f52c1ef6da
More trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum <guido@python.org>
parents:
2954
diff
changeset
|
135 return lines |
