MCPcopy Index your code
hub / github.com/RustPython/RustPython / addliteral

Function addliteral

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

Source from the content-addressed store, hash-verified

996 literal = []
997 lappend = literal.append
998 def addliteral():
999 if s.istext:
1000 result.append(''.join(literal))
1001 else:
1002 # The tokenizer implicitly decodes bytes objects as latin-1, we must
1003 # therefore re-encode the final representation.
1004 result.append(''.join(literal).encode('latin-1'))
1005 del literal[:]
1006 def addgroup(index, pos):
1007 if index > pattern.groups:
1008 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