Assignment

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by reading the beniget project linked in the issue and comparing its assignment and forward-substitution behavior with the provided Python example. Done means assignments in functions like foo are transformed into an equivalent conditional expression such as value < 3 ? 3 : 4; no repository files or tests are named.

Written by the indexing model from the issue text.

Description

We should use beniget for assignments and forward substitution. By using beniget we could allow this kind of functions:

def foo(value):
    if value < 3:
        b = 3
    else:
        b = 4
    return b

This should turn into an equivalent of value < 3 ? 3 : 4

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

Contributor guide

No contributing guide indexed for this repository

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.

More from QuantStack/py2vega

All issues in QuantStack/py2vega

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.