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

Method __new__

Lib/test/test__interpchannels.py:124–130  ·  view source on GitHub ↗
(cls, action, end=None, interp=None)

Source from the content-addressed store, hash-verified

122class ChannelAction(namedtuple('ChannelAction', 'action end interp')):
123
124 def __new__(cls, action, end=None, interp=None):
125 if not end:
126 end = 'both'
127 if not interp:
128 interp = 'main'
129 self = super().__new__(cls, action, end, interp)
130 return self
131
132 def __init__(self, *args, **kwargs):
133 if self.action == 'use':

Callers

nothing calls this directly

Calls 2

superClass · 0.85
__new__Method · 0.45

Tested by

no test coverage detected