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

Function addliteral

Lib/re/_parser.py:997–1004  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

995 literal = []
996 lappend = literal.append
997 def addliteral():
998 if s.istext:
999 result.append(''.join(literal))
1000 else:
1001 # The tokenizer implicitly decodes bytes objects as latin-1, we must
1002 # therefore re-encode the final representation.
1003 result.append(''.join(literal).encode('latin-1'))
1004 del literal[:]
1005 def addgroup(index, pos):
1006 if index > pattern.groups:
1007 raise s.error("invalid group reference %d" % index, pos)

Callers 2

addgroupFunction · 0.85
parse_templateFunction · 0.85

Calls 3

appendMethod · 0.45
joinMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…