parameters: (f)
return_statement: return f
docstring: Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
  	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
  	named 'mandatory' to disable the configuration errors::
  
  		def configure(conf):
  			conf.find_program('abc', mandatory=False)
  
  	:param f: method to bind
  	:type f: function
docstring_summary: Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
  	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
  	named 'mandatory' to disable the configuration errors::
docstring_tokens: Decorator : attach new configuration functions to : py : class : waflib . Build . BuildContext and : py : class : waflib . Configure . ConfigurationContext . The methods bound will accept a parameter named mandatory to disable the configuration errors ::
function: def conf(f):
  	"""
  	Decorator: attach new configuration functions to :py:class:`waflib.Build.BuildContext` and
  	:py:class:`waflib.Configure.ConfigurationContext`. The methods bound will accept a parameter
  	named 'mandatory' to disable the configuration errors::
  
  		def configure(conf):
  			conf.find_program('abc', mandatory=False)
  
  	:param f: method to bind
  	:type f: function
  	"""
  	def fun(*k, **kw):
  		mandatory = kw.pop('mandatory', True)
  		try:
  			return f(*k, **kw)
  		except Errors.ConfigurationError:
  			if mandatory:
  				raise
  
  	fun.__name__ = f.__name__
  	setattr(ConfigurationContext, f.__name__, fun)
  	setattr(Build.BuildContext, f.__name__, fun)
  	return f
function_tokens: def conf ( f ) : def fun ( * k , * * kw ) : mandatory = kw . pop ( 'mandatory' , True ) try : return f ( * k , * * kw ) except Errors . ConfigurationError : if mandatory : raise fun . __name__ = f . __name__ setattr ( ConfigurationContext , f . __name__ , fun ) setattr ( Build . BuildContext , f . __name__ , fun ) return f