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

Class Include

Tools/clinic/libclinic/codegen.py:76–92  ·  view source on GitHub ↗

An include like: #include "pycore_long.h" // _Py_ID()

Source from the content-addressed store, hash-verified

74
75@dc.dataclass(slots=True, frozen=True)
76class Include:
77 """
78 An include like: #include "pycore_long.h" // _Py_ID()
79 """
80 # Example: "pycore_long.h".
81 filename: str
82
83 # Example: "_Py_ID()".
84 reason: str
85
86 # None means unconditional include.
87 # Example: "#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)".
88 condition: str | None
89
90 def sort_key(self) -> tuple[str, str]:
91 # order: '#if' comes before 'NO_CONDITION'
92 return (self.condition or 'NO_CONDITION', self.filename)
93
94
95@dc.dataclass(slots=True)

Callers 2

add_includeMethod · 0.90
add_includeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…