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

Function "add_descendent_states_to_enter" uses variable name which is not in scope #17

Closed
dimsuz opened this issue Nov 4, 2020 · 1 comment

Comments

@dimsuz
Copy link

dimsuz commented Nov 4, 2020

When dealing with parallel state this bit of code passes variable s to add_descendent_states_to_enter (line 114), but it's not in scope here:

https://github.com/davidkpiano/xstate-python/blob/836b3a43a017831401cc3e44099d8f7090d60769/xstate/algorithm.py#L110-L119

Variable s is used in a list comprehension only. Unless I don't know something about python listcomp scoping.
Perhaps child should be passed here.

Not sure why it's not an error. Also I'm not sure how people manage to get anything sufficiently complex done in a language without proper type checking :)

@davidkpiano
Copy link
Member

Fixed in #20

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

No branches or pull requests

2 participants