I'm learning python, trying to figure out how does this code actually work:
def func(**args):
class BindArgs(object):
foo = args['foo']
print 'foo is ', foo
def __init__(self,args):
print "hello i am here"
return BindArgs(args) #return an instance of the class
f = func(foo=2)
Output:
foo is 2
hello i am here
But it's very confused that in the argument of a function func(foo=2) that takes equation mark in it. Could you please explain how the flow works?