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

discrepancy in how iterators are handled #533

Closed
kcrisman opened this issue Jun 1, 2020 · 4 comments
Closed

discrepancy in how iterators are handled #533

kcrisman opened this issue Jun 1, 2020 · 4 comments

Comments

@kcrisman
Copy link
Member

kcrisman commented Jun 1, 2020

The following code works in CoCalc

@interact
def taylor_polynomial(order=slider(range(1,13))):
    print(order)

But in Sage cell, you have to make the range into a list first. My guess is that maybe around https://github.com/sagemath/sagecell/blob/master/interact_compatibility.py#L45 one could do another check, or maybe if instead of

if isinstance(vmin, list):

it should check whether it is something iterable and then act accordingly.

Thoughts? I may be misinterpreting this.

@novoselt
Copy link
Member

novoselt commented Jun 5, 2020

It works now after 4611375 thanks for digging in and working on it!

@novoselt novoselt closed this as completed Jun 5, 2020
@kcrisman
Copy link
Member Author

kcrisman commented Jun 5, 2020

@novoselt great, thanks! One thing - why did you delete the documentation? I don't think it was wrong. This just extends it to a use case that had worked in the past that Python (not Sage) changed.

@novoselt
Copy link
Member

novoselt commented Jun 5, 2020

I've removed one of two copies of documentation, should have made a separate commit ;-)

@kcrisman
Copy link
Member Author

kcrisman commented Jun 5, 2020 via email

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