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

Function get_spaces_firstword

Lib/idlelib/codecontext.py:26–28  ·  view source on GitHub ↗

Extract the beginning whitespace and first word from codeline.

(codeline, c=re.compile(r"^(\s*)(\w*)"))

Source from the content-addressed store, hash-verified

24
25
26def get_spaces_firstword(codeline, c=re.compile(r"^(\s*)(\w*)")):
27 "Extract the beginning whitespace and first word from codeline."
28 return c.match(codeline).groups()
29
30
31def get_line_info(codeline):

Callers 1

get_line_infoFunction · 0.85

Calls 3

compileMethod · 0.45
groupsMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…