[IPython-dev] what goes wrong with %%file
MinRK
benjaminrk at gmail.com
Wed May 15 17:38:06 EDT 2013
On Wed, May 15, 2013 at 2:31 PM, Fernando Perez <fperez.net at gmail.com>wrote:
> On Tue, May 14, 2013 at 12:35 PM, Brian Granger <ellisonbg at gmail.com>
> wrote:
> > The name "%%file" is conceptually close to what the magic does = it
> > writes/saves/creates a *file*. What you call the action
> > (write/save/create) is ambiguous, the end result (file) is not. I
> > don't want to pick a name that emphasizes the ambiguous part of the
> > magic while underplaying the perfectly clear part (file).
>
> While I remember liking %%file when we had the initial naming
> discussions on this for these same reasons, unfortunately we have
> evidence that users do get confused by this. I've had the same
> question asked during teaching workshops over the last few months.
>
> If it's really confusing lots of users, we should find a way to
> mitigate that instead of having to answer this same question til the
> end of days.
>
> > The name "%%fwrite" requires users to make the non-obvious conceptual
> > jump that "f" = "file". That is a step back.
>
> Agreed, too cryptic.
>
> > If we do change the name (I am open to it but not thrilled about it) I
> > would prefer something that makes its purpose more obvious:
> >
> > %%writefile
> > %%savefile
> >
> > I also prefer names that order words in a grammatically sensible
> > manner (%%writefile rather than %%filewrite)
>
> Given that in python, the actual lingo uses 'write' (as in open('foo',
> 'w') and f.write() ), I think that writefile is probably my favorite
> choice. Starting with the word file helps a tiny bit
> discoverability/tab completion, but I also agree that a more natural
> reading probably outweighs that.
>
> >From everything we've seen so far, I'm leaning towards `writefile`,
> which should really be completely unambiguous to anyone and should
> clear this source of confusion once and for all.
>
Then I think PR #3317 <https://github.com/ipython/ipython/pull/3317> best
reflects consensus - rename to `writefile`,
no change in behavior.
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130515/1c90b614/attachment.html>
More information about the IPython-dev
mailing list