Is there way in python to set the default value of a parameter to a property of another parameter?
eg
I currently have a function in django which I would like to do
def supplier_default_product(region, supplier=region.default_supplier.id):
default_product_instance = Product.objects.get(name=default_product, supplier=supplier)
....
so that I can call it with either no supplier where it just uses the regions default supplier:
supplier_default_product(region)
or with a specified supplier:
supplier_default_product(region, supplier)