Çift Yıldızlı Parametre

This commit is contained in:
Mert Gör 🇹🇷 2023-08-05 16:27:48 +03:00
parent 78f04c396f
commit 9c4ca96e8e
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,15 @@
def foo(f):
print('foo')
def g(*args, **kwargs):
print('g')
f(*args, **kwargs)
return g
@foo
def bar(a, b, c, **kwargs):
print(f'bar: {a}, {b}, {c}, {kwargs}')
bar(10, 20, 30, xx=100, yy=200)
bar(50, 60, 70, zz=300, kk=400)