1__doc__ = u""" 2 >>> ext = Ext() 3 >>> b,c,d,e,f,g,h,k = ext.b,ext.c,ext.d,ext.e,ext.f,ext.g,ext.h,ext.k 4 5""" 6 7cdef class Ext: 8 def b(self, a, b, c): 9 pass 10 11 def c(self, a, b, c=1): 12 pass 13 14 def d(self, a, b, *, c = 88): 15 pass 16 17 def e(self, a, b, c = 88, **kwds): 18 pass 19 20 def f(self, a, b, *, c, d = 42): 21 pass 22 23 def g(self, a, b, *, c, d = 42, e = 17, f, **kwds): 24 pass 25 26 def h(self, a, b, *args, c, d = 42, e = 17, f, **kwds): 27 pass 28 29 def k(self, a, b, c=1, *args, d = 42, e = 17, f, **kwds): 30 pass 31"""# c 32 >>> c(1,2) 33 >>> c(1,2,3) 34 >>> c(1,2,3,4) 35 Traceback (most recent call last): 36 TypeError: c() takes at most 3 positional arguments (4 given) 37 38# b 39 >>> b(1,2,3) 40 >>> b(1,2,3,4) 41 Traceback (most recent call last): 42 TypeError: b() takes exactly 3 positional arguments (4 given) 43 44# e 45 >>> e(1,2) 46 >>> e(1,2, c=1) 47 >>> e(1,2, d=1) 48 >>> e(1,2, c=1, d=2, e=3) 49 >>> e(1,2,3) 50 >>> e(1,2,3,4) 51 Traceback (most recent call last): 52 TypeError: e() takes at most 3 positional arguments (4 given) 53 54# d 55 >>> d(1,2) 56 >>> d(1,2, c=1) 57 58 >>> d(1,2,3) 59 Traceback (most recent call last): 60 TypeError: d() takes exactly 2 positional arguments (3 given) 61 >>> d(1,2, d=1) 62 Traceback (most recent call last): 63 TypeError: d() got an unexpected keyword argument 'd' 64 65# g 66 >>> g(1,2, c=1, f=2) 67 >>> g(1,2, c=1, e=0, f=2, d=11) 68 >>> g(1,2, c=1, f=2, e=0, x=25) 69 70 >>> g(1,2,3) 71 Traceback (most recent call last): 72 TypeError: g() takes exactly 2 positional arguments (3 given) 73 >>> g(1,2) 74 Traceback (most recent call last): 75 TypeError: g() needs keyword-only argument c 76 >>> g(1,2, c=1) 77 Traceback (most recent call last): 78 TypeError: g() needs keyword-only argument f 79 80# f 81 >>> f(1,2, c=1) 82 >>> f(1,2, c=1, d=2) 83 84 >>> f(1,2,3) 85 Traceback (most recent call last): 86 TypeError: f() takes exactly 2 positional arguments (3 given) 87 >>> f(1,2) 88 Traceback (most recent call last): 89 TypeError: f() needs keyword-only argument c 90 >>> f(1,2, c=1, e=2) 91 Traceback (most recent call last): 92 TypeError: f() got an unexpected keyword argument 'e' 93 94# h 95 >>> h(1,2, c=1, f=2) 96 >>> h(1,2, c=1, f=2, e=3) 97 >>> h(1,2,3,4,5,6, c=1, f=2) 98 >>> h(1,2,3,4,5,6, c=1, f=2, e=3, x=25, y=11) 99 100 >>> h(1,2,3) 101 Traceback (most recent call last): 102 TypeError: h() needs keyword-only argument c 103 >>> h(1,2, d=1) 104 Traceback (most recent call last): 105 TypeError: h() needs keyword-only argument c 106 107# k 108 >>> k(1,2, c=1, f=2) 109 >>> k(1,2, c=1, f=2, e=3) 110 >>> k(1,2,3,4,5,6, d=1, f=2) 111 >>> k(1,2,3,4,5,6, d=1, f=2, e=3, x=25, y=11) 112 113 >>> k(1,2,3) 114 Traceback (most recent call last): 115 TypeError: k() needs keyword-only argument f 116 >>> k(1,2, d=1) 117 Traceback (most recent call last): 118 TypeError: k() needs keyword-only argument f 119""" 120