Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More fixes #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

More fixes #9

wants to merge 3 commits into from

Conversation

gboehl
Copy link
Contributor

@gboehl gboehl commented Mar 4, 2022

  1. The 'solver' argument for solved_blocks was being ignored. This is because the check was if 'solver' not in kwargs, but solver was defined by default, but an empty sting. The string evaluates as False, but solver in kwargs as True because the key is present.

  2. Two bugs in function parsing:

    1. The last occurence of the return-statement was evaluated instead of the first (as common in python)
    2. return statements in commented lines are evaluated anyways. This one was nasty.
  3. Allow *.appy() to take endogenou variables as kwargs. This fix worked for me, but is probably incomplete given that apply() is a method of other classes as well.

Example for (2.):

@simple
def func0(input):
   stuff = input
   return stuff

# def func1(input):
#  return thing

would evaluate as

@simple
def func0(input):
   stuff = input
   return thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant