Message234543
Ah, sorry, yes, this is what I meant (and I see what your'e trying to fix now!):
>>> import dis
>>> def f(x,y): pass
...
>>> dis.dis("f(y=1, **{'x': 1}, x=2)")
1 0 LOAD_NAME 0 (f)
3 LOAD_CONST 0 ('y')
6 LOAD_CONST 1 (1)
9 LOAD_CONST 1 (1)
12 LOAD_CONST 2 ('x')
15 BUILD_MAP 1
18 LOAD_CONST 3 (2)
21 LOAD_CONST 2 ('x')
24 BUILD_MAP 1
27 BUILD_MAP_UNPACK 2
30 CALL_FUNCTION_KW 256 (0 positional, 1 keyword pair)
33 RETURN_VALUE
>>> f(y=1, **{'x': 1}, x=2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: <module>() got multiple values for keyword argument 'x'
>>> |
|
Date |
User |
Action |
Args |
2015-01-23 05:26:36 | NeilGirdhar | set | recipients:
+ NeilGirdhar, gvanrossum, twouters, georg.brandl, terry.reedy, paul.moore, ncoghlan, belopolsky, ezio.melotti, eric.araujo, andybuckley, r.david.murray, zbysz, eric.snow, Rosuav, berker.peksag, Joshua.Landau, pconnell, Jeff.Kaufman, SpaghettiToastBook |
2015-01-23 05:26:36 | NeilGirdhar | set | messageid: <1421990796.67.0.742401885134.issue2292@psf.upfronthosting.co.za> |
2015-01-23 05:26:36 | NeilGirdhar | link | issue2292 messages |
2015-01-23 05:26:36 | NeilGirdhar | create | |
|