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,7 +4,9 @@ class Composition:
|
||||
self.g = g
|
||||
|
||||
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
|
||||
def __name__(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user