Fixed calling when g isn't supplied to Composition
This commit is contained in:
parent
2057d347d4
commit
a60c04fed8
BIN
__pycache__/compose.cpython-37.pyc
Normal file
BIN
__pycache__/compose.cpython-37.pyc
Normal file
Binary file not shown.
@ -4,6 +4,8 @@ class Composition:
|
|||||||
self.g = g
|
self.g = g
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
|
if self.g is None:
|
||||||
|
return self.f(*args, **kwargs)
|
||||||
return self.f(self.g(*args, **kwargs))
|
return self.f(self.g(*args, **kwargs))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user