You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working through the "Lists" episode I noticed potential for streamlining and isolating some proposed concepts.
The episode contains a section about using append to add items to a list.
The last bullet point introduces the function extend, which is an important and often used utility.
However, I see some problems with the current state:
While in some wide sense, the title Appending items to a list lengthens it is also true for extend, it is more fitting to introduce append solely, as it is the user's first contact to list extension.
The description and showcase of extend is actually longer than the presentation of append.
The proposed extend example with middle_aged_primes and teen_primes might be a bit weird and out of context.
Additionally, the extend example introduces the concept of nested lists and mixed-type list membership implicitly, which might not be the right place.
Proposal:
Extract the extend functionality into a separate section with the context of merging lists.
Make the example more intuitive.
Use the opportunity to introduce the + operator for list merging.
The changes are also contained in a PR#679 I have made previously.
I apologize for the inconvenience caused, as I didn't open an issue first.
I agree that the proposed changes should be talked about with the community.
Cheers,
Tobias
Which part of the content does your suggestion apply to?
How could the content be improved?
Hi Carpentry Team,
When working through the "Lists" episode I noticed potential for streamlining and isolating some proposed concepts.
The episode contains a section about using
append
to add items to a list.The last bullet point introduces the function
extend
, which is an important and often used utility.However, I see some problems with the current state:
Appending items to a list lengthens it
is also true forextend
, it is more fitting to introduceappend
solely, as it is the user's first contact to list extension.extend
is actually longer than the presentation ofappend
.extend
example withmiddle_aged_primes
andteen_primes
might be a bit weird and out of context.extend
example introduces the concept of nested lists and mixed-type list membership implicitly, which might not be the right place.Proposal:
extend
functionality into a separate section with the context of merging lists.+
operator for list merging.For 1. and 2.:
For 3.:
For 4. add to the types section:
The changes are also contained in a PR #679 I have made previously.
I apologize for the inconvenience caused, as I didn't open an issue first.
I agree that the proposed changes should be talked about with the community.
Cheers,
Tobias
Which part of the content does your suggestion apply to?
http://swcarpentry.github.io/python-novice-gapminder/11-lists.html#appending-items-to-a-list-lengthens-it.
The text was updated successfully, but these errors were encountered: