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

Class Foo

Lib/test/test_keywordonlyarg.py:27–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 return sorted(list(words), reverse=reverse)
26
27class Foo:
28 def __init__(self, *, k1, k2=0):
29 self.k1 = k1
30 self.k2 = k2
31 def set(self, p1, *, k1, k2):
32 self.k1 = k1
33 self.k2 = k2
34 def sum(self):
35 return self.k1 + self.k2
36
37class KeywordOnlyArgTestCase(unittest.TestCase):
38 def assertRaisesSyntaxError(self, codestr):

Callers 1

testFunctionCallMethod · 0.70

Calls

no outgoing calls

Tested by 1

testFunctionCallMethod · 0.56