From 2babe0db30c8576042091347fa05ba1dcaeb87f3 Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Wed, 18 Jan 2023 16:59:27 +0000 Subject: [PATCH] Handle form coefficients as an optional kwarg when calling a form (#125) Co-authored-by: David A. Ham --- ufl/form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ufl/form.py b/ufl/form.py index 652becfa8..4baa506ea 100644 --- a/ufl/form.py +++ b/ufl/form.py @@ -545,7 +545,7 @@ def __call__(self, *args, **kwargs): raise ValueError(f"Need {len(arguments)} arguments to form(), got {len(args)}.") repdict.update(zip(arguments, args)) - coefficients = kwargs.pop("coefficients") + coefficients = kwargs.pop("coefficients", None) if kwargs: raise ValueError(f"Unknown kwargs {list(kwargs)}")