Skip to content
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

[ENH] Add line breaks in _episodes/03-lists #566

Merged
merged 2 commits into from
Jul 17, 2018

Conversation

emdupre
Copy link
Contributor

@emdupre emdupre commented Jul 17, 2018

Helps to address #498, following up on #565 !

Changes proposed:

  • Breaks up long lines (i.e., > 100 characters) in _episodes/03-lists.md

Copy link
Contributor

@maxim-belkin maxim-belkin left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, @emdupre! Please see my comments below (above?) :)

> the list value, it will change for both variables!
> Be careful when modifying data in-place.
> If two variables refer to the same list, and you modify the list value,
> it will change for both variables!
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep all the lines above unchanged. They do not exceed the 100-character limit.

@@ -173,7 +175,8 @@ does not.
> Here is a visual example of how indexing a list of lists `x` works:
>
> <a href='https://twitter.com/hadleywickham/status/643381054758363136'>
> ![The first element of a list. Adapted from @hadleywickham's tweet about R lists.](../fig/indexing_lists_python.png)</a>
> ![The first element of a list. Adapted from @hadleywickham.](../fig/indexing_lists_python.png)
> </a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rewrite this link in Markdown.

[![The first element of a list.
   Adapted from @hadleywickham.](../fig/indexing_lists_python.png)][hadleywickham-tweet]

And add the following to the bottom of the document:

[hadleywickham-tweet]: https://twitter.com/hadleywickham/status/643381054758363136

@@ -214,7 +217,7 @@ does not.

> ## Heterogeneous Lists
> Lists in Python can contain elements of different types. Example:
> ~~~
> ~~~
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@maxim-belkin maxim-belkin added the type:enhancement Propose enhancement to the lesson label Jul 17, 2018
@maxim-belkin maxim-belkin self-assigned this Jul 17, 2018
@@ -539,4 +539,6 @@ Omitting ending index: ["sep", "oct", "nov", "dec"]
> {: .solution}
{: .challenge}

[hadleywickham-tweet]: https://twitter.com/hadleywickham/status/643381054758363136

{% include links.md %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! Was about to add a comment about it :)

> <a href='https://twitter.com/hadleywickham/status/643381054758363136'>
> ![The first element of a list. Adapted from @hadleywickham's tweet about R lists.](../fig/indexing_lists_python.png)</a>
> [![The first element of a list.
Adapted from @hadleywickham.](../fig/indexing_lists_python.png)][hadleywickham-tweet]
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this does not change much, but let's add > in the beginning of this line.

@@ -539,4 +539,6 @@ Omitting ending index: ["sep", "oct", "nov", "dec"]
> {: .solution}
{: .challenge}

[hadleywickham-tweet]: https://twitter.com/hadleywickham/status/643381054758363136
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use this link on line 211 as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch !

Copy link
Contributor

@maxim-belkin maxim-belkin left a comment

Choose a reason for hiding this comment

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

Thanks again, @emdupre!

@maxim-belkin maxim-belkin merged commit 274c48e into swcarpentry:gh-pages Jul 17, 2018
@emdupre
Copy link
Contributor Author

emdupre commented Jul 18, 2018

Thank you !

zkamvar pushed a commit that referenced this pull request Apr 21, 2023
 - Fixes (long) lines: 176
 - Changes "in place" to "in-place" as in  `Be careful when modifying data in-place`
 - Define new link "hadleywickham-tweet" (DRY)

Pull Request: #566
Related Issue: #498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Propose enhancement to the lesson
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants