lf-lang / lf-lang/lf-python-support

Too Easy to Share state variable as Pointer in Python

Open
#18 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

If the target language is Python, it is really easy to share the state variable as a pointer but not as value.
Here is an example of me incorrectly passing the pointer of a list to reactors.
Also, it will be better if the example here from the tutorial video can clarify the state value must not be pointer when share to downstream reactors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Python example at SharedList/SharedList.lf line 18 and compare it with the referenced tutorial video segment. Clarify in the example or associated tutorial material that shared state should be passed by value rather than as a pointer, and consider how the video guidance can be updated; done means the intended state-sharing behavior is explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.