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

Added example multi-line indented block #105

Merged
merged 5 commits into from
Nov 30, 2013

Conversation

wltrimbl
Copy link

Additionally, added sentences introducing the loops through zip() and iter()

This responds to student confusion about where the if statement ends.

@@ -322,7 +322,7 @@
"elif x == 2:\n",
" print \"x is two\"\n",
"else:\n",
" print \"x is positive and greater than 2\""
" print \"x is positive and is not 0, 1, or 2\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not equal to 0, 1, or 2?

Since we're being very careful here :)

@rgaiacs
Copy link

rgaiacs commented Oct 24, 2013

@wltrimbl Nice PR. After you take a look in the comments I will review it again.

@wltrimbl
Copy link
Author

I addressed all the minor points except the spelling of the plural of index and line wrapping convention, and have revised the line that implied that indented blocks were only for conditionals. Thanks all for the editing comments.

@@ -291,7 +291,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"While there must be one if statetment, and there may be at most one else statement, there maybe as many elif statements as are desired.\n",
"While there must be one if statement, and there may be at most one else statement, there maybe as many elif statements as are desired.\n",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget something in "there maybe as many elif statements"?

@rgaiacs
Copy link

rgaiacs commented Oct 27, 2013

@wltrimbl Good work based in the previous review. I add some minor comments but want to see others comment about the paragraph about indentation (line 336) before approve this PR.

@ahmadia
Copy link
Contributor

ahmadia commented Nov 4, 2013

@wltrimbl - apologies, but this needs to be rebased :(

@wltrimbl
Copy link
Author

wltrimbl commented Nov 4, 2013

Rebase attempted:
git checkout gh-pages
git pull upstream gh-pages
git checkout thw-indentedcblock
git rebase gh-pages
#resolved conflicts
git push wltrimbl +thw-indentedcblock # force update of rebased branch
This branch is 3 commits ahead and 0 commits behind gh-pages.

@gvwilson
Copy link
Contributor

gvwilson commented Nov 8, 2013

I vote for merging this, then incorporating it into python/intermediate (if @ethanwhite agrees). Any votes again?

@ahmadia
Copy link
Contributor

ahmadia commented Nov 8, 2013

I'd suggest we review the rebased material before merging.

@wltrimbl
Copy link
Author

wltrimbl commented Nov 8, 2013

Scrutinzing this line-by-line, I find that I have spell-corrected (which is to say, corrupted) one of the instructor's names.

There are also one or a few instances of function() and .method() , which violate @gwilson's style guide. I half-heartedly intend to remove the empty parentheses from the functions but not the methods.

@ahmadia
Copy link
Contributor

ahmadia commented Nov 8, 2013

Errr, we have a style guide?

@wltrimbl
Copy link
Author

To summarize:
This PR

  • adds an explicit example of an if statement with more than one print statement in its block
  • adds line describing the data type returned by range
  • adds lines describing the data types returned by zip and items
  • clarifies text defining behavior of break and continue
  • spelling and minor orthographic tweaks

This PR does not introduce new content (TM)

@wltrimbl
Copy link
Author

By style guide I mean style guidance: the notes in PR #71 on consistency between using function(3) and not calling it function() in the text.

Any objections to merging?

Conflicts:
	lessons/thw-python/flow-control/python_flow_control.ipynb
	lessons/thw-python/vars-types/variables.ipynb
@ahmadia
Copy link
Contributor

ahmadia commented Nov 30, 2013

This can't be merged automatically, I'm bringing it in by hand.

@ahmadia ahmadia merged commit e8b74df into swcarpentry:gh-pages Nov 30, 2013
@wltrimbl wltrimbl deleted the thw-indentedcblock branch June 17, 2014 19:05
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.

None yet

5 participants