def fluent(method):
	"""Used to define fluent API class methods"""
	@wraps(method)
	def wrapped(self, *args, **kwargs):
		dupe = deepcopy(self)
		method(dupe, *args, **kwargs)
		return dupe
	return wrapped
Used to define fluent API class methods
recipes/Python/579078_Fluent_API_method_decorator/recipe-579078.py