"""Returns a pretty-print of the parameters to the constructor of a class, which should be able to copy-paste on the command line to create the object (with few exceptions)."""
"""Returns a pretty-print of the parameters to the constructor of a class, which should be able to copy-paste on the command line to create the object (with few exceptions)."""
return"%s(%s)"%(
str(obj.__class__),
", ".join(
[
"%s='%s'"%(key,value)
ifisinstance(value,six.string_types)
else"%s=%s"%(key,value)
forkey,valueinkwargs.items()
ifvalueisnotNone
]
),
)
defis_argument_available(argument,method):
"""
"""
Check if an argument (or keyword argument) is available in a method