def foo(self, **kwargs):
bar = kwargs
bar['_id'] = self.app_id
return pass
def foo(self, **kwargs):
kwargs['_id'] = self.app_id
return pass
return pass
?def f(**kwargs):
print(kwargs)
kwargs['a'] = 2
kwargs['b'] = 3
print(kwargs)
f(a=1)
>>> def foo(**kwargs):
kwargs['id'] = 1
print 'Internal: %s' % kwargs['id']
>>> d = {'id': 0}
>>> foo(**d)
Internal: 1
>>> d
{'id': 0}
>>> def foo(**kwargs):
kwargs['id'][:] = [4, 5, 6]
print 'Internal: %s' % kwargs['id']
>>> d = {'id': [1, 2, 3]}
>>> foo(**d)
Internal: [4, 5, 6]
>>> d
{'id': [4, 5, 6]}