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

artifact code extraction cannot split within lines. #477

Open
yifanwu opened this issue Jan 6, 2022 · 4 comments
Open

artifact code extraction cannot split within lines. #477

yifanwu opened this issue Jan 6, 2022 · 4 comments
Labels
bug Something isn't working Language Support Issue with our coverage of Python and library code constructs

Comments

@yifanwu
Copy link
Contributor

yifanwu commented Jan 6, 2022

Your code:

a = 1; b = 2; d= 4; print(a); c = a + b
c_art = lineapy.save(c, "test multiple lines")

Issue: the code for c_art includes the entire line: a = 1; b = 2; d= 4; print(a); c = a + b

It's probably lower priority to slice within a line, but just flagging that this is a known issue.

@yifanwu yifanwu added bug Something isn't working Language Support Issue with our coverage of Python and library code constructs labels Jan 6, 2022
@edwardlee4948
Copy link
Contributor

edwardlee4948 commented Jun 24, 2022

additional testcase for for-loop cases

import lineapy
a = 1
b = 0
for i in range (4): b = b + 1; print('Added 4 times'); d = 3;
c = a + b

c_art = lineapy.save(c, "test multiple lines")

@yifanwu
Copy link
Contributor Author

yifanwu commented Jun 28, 2022

@EunminLee thanks for adding your thoughts! Curious if this syntax is something you use often at work? Curious so we can gather evidence for prioritization.

Thanks!

@edwardlee4948
Copy link
Contributor

@yifanwu I never use this syntax. In my opinion, ";" shouldn't be used in python.

@yifanwu
Copy link
Contributor Author

yifanwu commented Jun 28, 2022

@yifanwu I never use this syntax. In my opinion, ";" shouldn't be used in python.

Haha that's good to hear. We'll then continue to de-prioritize the feature support because of how uncommon the syntax is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Language Support Issue with our coverage of Python and library code constructs
Projects
None yet
Development

No branches or pull requests

2 participants