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

Function _is_dunder

Lib/enum.py:46–55  ·  view source on GitHub ↗

Returns True if a __dunder__ name, False otherwise.

(name)

Source from the content-addressed store, hash-verified

44 )
45
46def _is_dunder(name):
47 """
48 Returns True if a __dunder__ name, False otherwise.
49 """
50 return (
51 len(name) > 4 and
52 name[:2] == name[-2:] == '__' and
53 name[2] != '_' and
54 name[-3] != '_'
55 )
56
57def _is_sunder(name):
58 """

Callers 2

__setitem__Method · 0.70
convert_classFunction · 0.70

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected