[IPython-dev] Default values for widgets
Sat Feb 8 16:20:32 CST 2014
Thinking a bit more...
Right now, we look at the following places for widget abbreviations:
1. kwargs to interact
3. defaults to individual keyword args in the def of the function.
I think it is a bit dangerous to do 3. It would probably be a better
solution to use 3 for setting the initial value of the widget.
Otherwise, I think we are making defaults for functions do too many
things. Stefan, want to open an issue on this? If others like it, you
could even to a PR ;-) It shouldn't be too difficult.
On Fri, Feb 7, 2014 at 11:08 PM, Stéfan van der Walt <email@example.com> wrote:
> On Fri, 07 Feb 2014 22:56:36 -0800, Brian Granger wrote:
>> interact(f, a=FloatSliderWidget(..., value=10), ...)
> That will do the trick for me, thanks.
>> We decided that we wanted to keep the abbreviations as simple as
>> possible and just allow people to pass Widgets for the more
>> complicated usage cases. Part of this is that we are wanting to be as
>> slow/conservative as possible in introducing complexity to new APIs.
>> We want to see how this stuff works in practice and gather data from
>> our users (like this!).
> The data point for me then is that it feels unintuitive that the default
> keyword argument is not respected.
> Thanks for all your hard work on this!
> IPython-dev mailing list
Brian E. Granger
Cal Poly State University, San Luis Obispo
firstname.lastname@example.org and email@example.com
More information about the IPython-dev