jakevdp / ipywidgets-static

[obsolete] Static Widgets for IPython Notebooks
BSD 3-Clause "New" or "Revised" License
108 stars 24 forks source link

StaticInteract vanishing output with depending on variable name capitalization #16

Open akhmerov opened 9 years ago

akhmerov commented 9 years ago

The following code produces a StaticInteract where the output disappears when the sliders are being moved or clicked:

from ipywidgets import StaticInteract, RangeWidget
StaticInteract(lambda alph, BB: (alph, BB), 
               alph=RangeWidget(0, 10, 1),
               BB=RangeWidget(0, 10, 1))

Changing alph and BB into x and y fixes the problem.

For more examples see http://nbviewer.ipython.org/urls/dl.dropboxusercontent.com/u/763585/multiletter.ipynb

Edit: Further investigation showed that the problem appears when the ordering of variable names is changed by str.tolower().

jakevdp commented 9 years ago

Thanks! If you know how to fix this, I'll accept a PR!