Skip to content

Commit

Permalink
Comment __new__
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouziani committed Sep 24, 2021
1 parent 8f5e0b3 commit 72cddd9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ufl/coefficient.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ class Coefficient(FormArgument, BaseCoefficient):
__str__ = BaseCoefficient.__str__
_ufl_signature_data_ = BaseCoefficient._ufl_signature_data_

def __new__(cls, *args, **kw):
if args[0] and is_dual(args[0]):
return Cofunction(*args, **kw)
return super().__new__(cls)
#def __new__(cls, *args, **kw):
# if args[0] and is_dual(args[0]):
# return Cofunction(*args, **kw)
# return super().__new__(cls)

def __init__(self, function_space, count=None):
FormArgument.__init__(self)
Expand Down

0 comments on commit 72cddd9

Please sign in to comment.