Interact options by jdemeyer · Pull Request #771 · jupyter-widgets/ipywidgets (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Implement #430:
@interact.option(manual=True)
def function(...):
pass
No idea why Travis CI is failing here. It seems to be complaining about Javascript-related issues while I didn't make any changes to that.
Leaving this open to give @Carreau the opportunity to comment.
Let me just remind that only the last 2 commits need to be reviewed (the first commits are from #762).
@jdemeyer if you rebase, we should only see those commits.
if you rebase, we should only see those commits.
<rant>
I consider that a GitHub bug/misfeature since those first commits are literally (with the same hash) in master
now, so it shouldn't show them in the diff.
This is IMHO yet another thing that Trac gets right but GitHub does not.</rant>
Anyway, should I rebase or merge in master
or just leave it?
I completely agree. I am out for lunch and my desktop computer screen shows two ongoing 3-pane merges. I am constantly in the middle of a rebase... Meld is my ide :)
But I prefer rebase over merge and here the rebase would not require any manual action...
I'm happy with that, I'll trust Sylvain on it, haven't touched widgets in a while.
This was referenced
Sep 20, 2016
Noting for future people: one huge issue with this implementation is that it can't be used as a decorator anymore:
from ipywidgets import interact @interact.options(manual=True)(x=(0,10)) def f(x): print(x)
gives a syntax error. That's because decorators are syntactically limited to a single function call. A way around it is to store the partial interact as another variable:
from ipywidgets import interact myinteract = interact.options(manual=True) @myinteract(x=(0,10)) def f(x): print(x)
(for convenience, an ipywidgets.interact_manual is defined with this option.)
github-actions bot locked as resolved and limited conversation to collaborators
Labels
Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.