Skip to content

Fix parentheses typo #2065

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

Merged
merged 1 commit into from
Jun 30, 2012
Merged

Fix parentheses typo #2065

merged 1 commit into from
Jun 30, 2012

Conversation

jasongrout
Copy link
Member

Small typo in 0.13 What's New

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Interesting: it wasn't really a typo, I meant it as typed. But now I realize it reads much better the other way :)

That's what I get for writing such a huge document in a maniac sprint... Oh well, we're not going for the Nobel prize in literature here...

Thanks for the fix! Merging now.

fperez added a commit that referenced this pull request Jun 30, 2012
@fperez fperez merged commit 7e26d26 into ipython:master Jun 30, 2012
@jasongrout
Copy link
Member Author

You guys are amazing. I'm really excited about this release. I've already uploaded a Sage spkg: http://trac.sagemath.org/sage_trac/ticket/12719

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Thanks Jason, kind words much appreciated. And again, kudos for your cross-project enthusiasm, we're all the better for it!

@fperez
Copy link
Member

fperez commented Jun 30, 2012

BTW, regarding William's comment, that was not a mistake or omission: it was a very deliberate choice we made after lots of thought. Given that we manage numbered prompts and history, and that matplotlib produces so many plots as side effects, after much experimentation we found it worked much better to only execute with 'interactive' mode the last block.

Sage doesn't distinguish stdout from python sys.displayhook, so the opposite behavior may be more desirable, but we actually consider that a 'bad design choice' of sage, because it loses an important distinction and the cache management of output history.

So in summary: our choice is actually sensible and consistent given IPython's internal design :)

@jasongrout
Copy link
Member Author

Sorry, I didn't mean to throw this simple pull request way off-topic. I'm reposting your comment to the trac ticket.

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Sure! This is already closed, so no worries :)

@jasongrout
Copy link
Member Author

I responded to your comment on the trac ticket. Reposting here just in case you don't have a trac account:

Fernando: I looked in the IPython source, and it seems that IPython is a little more subtle than mentioned above. By default, it only executes the last block as interactive (compile in 'single' mode) if it is an expression. In Sage, we (by default) execute the last block always in 'single' mode. I think that is the difference here.

Given that (and if I understood correctly), could you explain again your reasoning for choosing to not compile in 'single' mode if it isn't an expression?

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Precisely so that if the last block has a loop, it doesn't produce multiple Out [NN] cells. We want to keep a one-to-one mapping between a cell and its output. For example it's quite common to write code like:

for i in x:
  plot(x[i], label='blah_i')

If we compile that as 'single', we'd get all the Matplotlib line collection results piling up at the bottom, one for each plot call.

We played a lot with various options, and settled on this behavior after much experimentation. After 2 years of using it, I remain convinced it's the right solution for us. Not to say that Sage can't make a different choice that works better for you guys, of course!

@jasongrout
Copy link
Member Author

Thanks. That makes a lot of sense. I've posted the relevant info back to the trac ticket for Sage.

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Awesome, thanks!

@jasongrout
Copy link
Member Author

Wow, this new auto-updating of comments on pull requests is nice! It's almost like a chat.

Anyways, thanks again.

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Yup, I love it. Been using it today extensively to effectively chat on new issues. GH rocks.

Will you make it to scipy'2012? GH folks are sponsoring and coming to give a talk. Should be fun.

@jasongrout
Copy link
Member Author

No, I can't. I look forward to going another year, though.

@fperez
Copy link
Member

fperez commented Jun 30, 2012

Bummer. We'll be in touch regardless :)

Carreau pushed a commit to Carreau/ipython that referenced this pull request Jul 13, 2012
backported to 0.13.1 from PR ipython#2065
minrk added a commit that referenced this pull request Jul 21, 2012
Small typo in 0.13 What's New
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
@jasongrout jasongrout deleted the patch-4 branch April 17, 2015 19:23
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

Successfully merging this pull request may close these issues.

2 participants