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

Method checkgroupname

tools/python-3.11.9-amd64/Lib/re/_parser.py:304–314  ·  view source on GitHub ↗
(self, name, offset, nested)

Source from the content-addressed store, hash-verified

302 return error(msg, self.string, self.tell() - offset)
303
304 def checkgroupname(self, name, offset, nested):
305 if not name.isidentifier():
306 msg = "bad character in group name %r" % name
307 raise self.error(msg, len(name) + offset)
308 if not (self.istext or name.isascii()):
309 import warnings
310 warnings.warn(
311 "bad character in group name %a at position %d" %
312 (name, self.tell() - len(name) - offset),
313 DeprecationWarning, stacklevel=nested + 7
314 )
315
316def _class_escape(source, escape):
317 # handle escape code inside character class

Callers 2

parse_templateFunction · 0.95
_parseFunction · 0.80

Calls 5

errorMethod · 0.95
tellMethod · 0.95
isidentifierMethod · 0.80
isasciiMethod · 0.80
warnMethod · 0.45

Tested by

no test coverage detected