Fixed calling when g isn't supplied to Composition
This commit is contained in:
parent
2057d347d4
commit
a60c04fed8
Binary file not shown.
|
@ -4,7 +4,9 @@ class Composition:
|
||||||
self.g = g
|
self.g = g
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
return self.f(self.g(*args, **kwargs))
|
if self.g is None:
|
||||||
|
return self.f(*args, **kwargs)
|
||||||
|
return self.f(self.g(*args, **kwargs))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def __name__(self):
|
def __name__(self):
|
||||||
|
|
Loading…
Reference in New Issue