Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Added explicit exposition on half-open nature of list indexes #95

Merged
merged 2 commits into from
Nov 8, 2013

Conversation

wltrimbl
Copy link

Added explicit mention of the limits of slicing; added before-and-after print statements for extend and append.

@wking
Copy link
Contributor

wking commented Oct 22, 2013

On Tue, Oct 22, 2013 at 01:31:17PM -0700, Will Trimble wrote:

  • Added explicit exposition on half-open nature of list indexes

Looks good to me, but you might want to link to the docs:

http://docs.python.org/2/reference/datamodel.html#index-69
http://docs.python.org/3/reference/datamodel.html#index-62

for folks who want an “official” reference.

@wking
Copy link
Contributor

wking commented Oct 22, 2013

It may also be better to remove the explicit \n wrapping and just
let IPython flow the text as it sees fit.

@ahmadia
Copy link
Contributor

ahmadia commented Oct 22, 2013

ooh! ooh! Can we add a Markdown version of my favorite diagram in the world?

Forward indices

 0   1   2   3   4   5
 +---+---+---+---+---+
 | H | e | l | p | A |
 +---+---+---+---+---+
-5  -4  -3  -2  -1

Backward indices

From http://docs.python.org/2/tutorial/introduction.html#strings

@ahmadia
Copy link
Contributor

ahmadia commented Oct 28, 2013

+1

@ahmadia
Copy link
Contributor

ahmadia commented Nov 4, 2013

This looks ready to merge to me. @wking - do you mind doing a final sanity check on the commits and changes then merging or rebasing this in? I think we prefer merging unless the rebase will substantially clarify things.

@ghost ghost assigned wking Nov 4, 2013
@wking
Copy link
Contributor

wking commented Nov 4, 2013

On Sun, Nov 03, 2013 at 05:40:23PM -0800, Aron Ahmadia wrote:

This looks ready to merge to me. @wking - do you mind doing a final
sanity check on the commits and changes then merging or rebasing
this in?

Do we have a newline-in-IPyNb-Markdown policy? The closest thing I
can find is 2. I'll install IPython and see if the manually-wrapped
source matters ;). If it doesn't, I'll merge the branch.

@ahmadia
Copy link
Contributor

ahmadia commented Nov 4, 2013

@wking - We don't have one. It shouldn't affect things. You may also want to double-check using nbviewer on the raw ipynb sources.

@wking
Copy link
Contributor

wking commented Nov 4, 2013

On Sun, Nov 03, 2013 at 07:11:39PM -0800, Aron Ahmadia wrote:

It shouldn't affect things.

Confirmed.

You may also want to double-check using nbviewer on the raw ipynb
sources.

Good idea. Here we are:

I'd prefer — (U+2014 EM DASH) to the -- added in 305bbb1 (Added link
to documentation on lists, 2013-10-23), but I haven't been able to dig
up IPyNb-encoding documentation 1. Is it UTF-8 by default? ASCII
by default? $LANG by default?

@wltrimbl
Copy link
Author

wltrimbl commented Nov 4, 2013

As I understand it, the only place the newlines matter is in the diffs.

@gvwilson
Copy link
Contributor

gvwilson commented Nov 8, 2013

+1 on merging: any votes against?

@ahmadia
Copy link
Contributor

ahmadia commented Nov 8, 2013

I am also +1 on merging this one.

@gvwilson
Copy link
Contributor

gvwilson commented Nov 8, 2013

On 2013-11-08 4:12 PM, Aron Ahmadia wrote:

I am also +1 on merging this one.

Go ahead and push the button.

@ahmadia
Copy link
Contributor

ahmadia commented Nov 8, 2013

It's @wking's show, I'm sure he'll be along shortly :)

@wking
Copy link
Contributor

wking commented Nov 8, 2013

On Fri, Nov 08, 2013 at 01:21:06PM -0800, Aron Ahmadia wrote:

It's @wking's show, I'm sure he'll be along shortly :)

Sorry, it took me a while to get IPython 1.0.0 installed on my wimpy
netbook (Gentoo also thought it was time to upgrade to GCC 4.7 and
Firefox 17.0.9 ;). Merging.

As a completly pedantic comment, I think italics would be preferable
to bold in “elements returned include the starting index but
exclude the final index”, using this rule 1:

  • Bold to pick out key terms (page-level emphasis)
  • Italics to stress phrases (sentence-level emphasis)

A lot of bold in one sentence looks a bit garish.

@wking
Copy link
Contributor

wking commented Nov 8, 2013

On Fri, Nov 08, 2013 at 01:56:53PM -0800, W. Trevor King wrote:

As a completly pedantic comment,

Also in this line, I'd rather have an em-dash (—, U+2014 EM DASH) than
the -- approximation, but I'm not sure how IPython handles
encoding/charsets. I thought I'd posted about that earlier, but I
guess not ;). Food for another PR ;).

@wking wking merged commit 305bbb1 into swcarpentry:gh-pages Nov 8, 2013
@wking
Copy link
Contributor

wking commented Nov 8, 2013

On Fri, Nov 08, 2013 at 01:56:53PM -0800, W. Trevor King wrote:

Merging.

Hmm, GitHub mailed me that there was a Jekyll error during the build,
but local builds with Jekyll 1.2.1 work for me. Should I back this
out until we diagnose the problem?

@wltrimbl
Copy link
Author

wltrimbl commented Nov 8, 2013

The only file changed was an ipython notebook.

@wking
Copy link
Contributor

wking commented Nov 8, 2013

On Fri, Nov 08, 2013 at 02:20:49PM -0800, Will Trimble wrote:

The only file changed was an ipython notebook.

Right. I wouldn't be surprised if the build was broken by something
that landed before this series. I think GitHub only sends mail about
broken builds to the dev who pushes the gh-pages update, so I'm not
sure if earlier builds were succeeding.

@gvwilson
Copy link
Contributor

gvwilson commented Nov 8, 2013

On 2013-11-08 5:18 PM, W. Trevor King wrote:

On Fri, Nov 08, 2013 at 01:56:53PM -0800, W. Trevor King wrote:

Merging.

Hmm, GitHub mailed me that there was a Jekyll error during the build,
but local builds with Jekyll 1.2.1 work for me. Should I back this
out until we diagnose the problem?
sigh Wouldn't it be nice if Jekyll reported line numbers when it has
trouble parsing things?

@wltrimbl
Copy link
Author

wltrimbl commented Nov 8, 2013

https://github.com/swcarpentry/bc/pull/133/files has a suspicious ../../..

@wking
Copy link
Contributor

wking commented Nov 8, 2013

On Fri, Nov 08, 2013 at 02:25:41PM -0800, Greg Wilson wrote:

sigh Wouldn't it be nice if Jekyll reported line numbers when it
has trouble parsing things?

Yup :p. It looks like they've been bumping versions recently 1, but
I don't have time to track down and install the new stuff right now.
Back the merge out (which may not even fix the problem)? Or just roll
with a broken gh-pages?

@wking
Copy link
Contributor

wking commented Nov 8, 2013

On Fri, Nov 08, 2013 at 02:26:36PM -0800, Will Trimble wrote:

https://github.com/swcarpentry/bc/pull/133/files has a suspicious ../../..

It looks like that was from increased nesting:

lessons/thw-git/instructors.md → lessons/misc-git/git-and-github/instructor_notes.md

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants