MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / getline

Function getline

tools/python-3.11.9-amd64/Lib/linecache.py:26–33  ·  view source on GitHub ↗

Get a line for a Python source file from the cache. Update the cache if it doesn't contain an entry for this file already.

(filename, lineno, module_globals=None)

Source from the content-addressed store, hash-verified

24
25
26def getline(filename, lineno, module_globals=None):
27 """Get a line for a Python source file from the cache.
28 Update the cache if it doesn't contain an entry for this file already."""
29
30 lines = getlines(filename, module_globals)
31 if 1 <= lineno <= len(lines):
32 return lines[lineno - 1]
33 return ''
34
35
36def getlines(filename, module_globals=None):

Callers 2

basic_string.hFile · 0.85
vstring.hFile · 0.85

Calls 1

getlinesFunction · 0.85

Tested by

no test coverage detected