Çift Yıldızlı Parametre
This commit is contained in:
parent
78f04c396f
commit
9c4ca96e8e
15
python-temel/cift.yildizli.parametre.py
Normal file
15
python-temel/cift.yildizli.parametre.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user