Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python anonymous object


class MicroMock(object):
  def __init__(self, **kwargs):
    self.__dict__.update(kwargs)
  def print_foo(x):
    print x.foo
    print_foo(MicroMock(foo=3))
Source by newbedev.com #
 
PREVIOUS NEXT
Tagged: #python #anonymous #object
ADD COMMENT
Topic
Name
3+4 =