mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Allowed to pass arguments to the generator functions (optional)
This commit is contained in:
@@ -15,8 +15,8 @@ class Generator:
|
||||
def __str__(self):
|
||||
return str(self.id) + " " + self.title + " " + self.generalProb + " " + self.generalSol
|
||||
|
||||
def __call__(self):
|
||||
return self.func()
|
||||
def __call__(self, **kwargs):
|
||||
return self.func(**kwargs)
|
||||
|
||||
# || Non-generator Functions
|
||||
def genById(id):
|
||||
|
||||
Reference in New Issue
Block a user