Invalid positonal args cannot be passed over as kwargs using **kwargs

Input:
def a(x, y=None):
   print x, y

def b(x, **kw):
    a(x, **kw)

def c(x, y):
    print x, y

c(1, y=1)
b(1, y=2)
b(1, 3)

Output:
1 1
1 2
Traceback (most recent call last):
  File "a.py", line 12, in <module>
    b(1, 3)
TypeError: b() takes exactly 1 argument (2 given)

Comments

Anonymous said…
Las Vegas' Wynn Casino - JTM Hub
Casino. worrione.com Wynn is a $4 billion resort with four ventureberg.com/ hotel towers with 5,750 rooms 출장안마 and หารายได้เสริม suites. Each of septcasino.com the hotel towers includes a 20,000 square foot casino and a

Popular posts from this blog

Multiple repeat error when the regex has multiple wildcards in python re module

Weakref proxy is for instance only ...

To speed up accessing files on nfs shares on a ubuntu machine ...