MCPcopy Index your code
hub / github.com/python/cpython / _make_prefix

Method _make_prefix

Lib/difflib.py:1937–1946  ·  view source on GitHub ↗

Create unique anchor prefixes

(self)

Source from the content-addressed store, hash-verified

1935 + f'<td{css_class}nowrap="nowrap">{text}</td>'
1936
1937 def _make_prefix(self):
1938 """Create unique anchor prefixes"""
1939
1940 # Generate a unique anchor prefix so multiple tables
1941 # can exist on the same HTML page without conflicts.
1942 fromprefix = "from%d_" % HtmlDiff._default_prefix
1943 toprefix = "to%d_" % HtmlDiff._default_prefix
1944 HtmlDiff._default_prefix += 1
1945 # store prefixes so line format method has access
1946 self._prefix = [fromprefix,toprefix]
1947
1948 def _convert_flags(self,fromlist,tolist,flaglist,context,numlines):
1949 """Makes list of "next" links"""

Callers 1

make_tableMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected