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

Function _enum_to_int

Lib/signal.py:36–43  ·  view source on GitHub ↗

Convert an IntEnum member to a numeric value. If it's not an IntEnum member return the value itself.

(value)

Source from the content-addressed store, hash-verified

34
35
36def _enum_to_int(value):
37 """Convert an IntEnum member to a numeric value.
38 If it's not an IntEnum member return the value itself.
39 """
40 try:
41 return int(value)
42 except (ValueError, TypeError):
43 return value
44
45
46# Similar to functools.wraps(), but only assign __doc__.

Callers 1

signalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected