-
-
Notifications
You must be signed in to change notification settings - Fork 807
Update 01-numpy.md #162
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
Update 01-numpy.md #162
Conversation
In the challenge 'Sorting out references' multiple assignment is used without any previous mention. I have added the use of assigning multiple values to multiple variables in the numpy methods section. I understand that this is introducing two new concepts at the same time (methods and multiple assignment). It does allow the student to chunk the three descriptive statistics though so is might lower the load on working memory The other options are to introduce simultaneous assignment in it's own section, either in this lesson or move it elsewhere and move the challenge. There is also the option of removing the multiple assignment from the challenge and assigning each variable separately.
|
Surprisingly (to me) I'm ok with this change, because multiple assignment is used often and we expect it for the exercise, but I would like to hear other people's opinions? All comments welcome. @gvwilson @jiffyclub @tbekolay |
|
I don't have a problem with assigning to multiple things with tuples, but I don't quite see the motivation for introducing this syntax at this point specifically. If we think people will be confused about it in that exercise, I would think a callout or some explicit text about it would be in order, rather than adding it to an inline code snippet; in a sense, I think it breaks the visual flow of that portion of the lesson (from a certain point onwards, all the code examples just print some small snippet, which is what this code example also does). That's just my opinion though; if it could be added somewhere where it would save a line instead of introduce additional lines (which is typically why multiple assignment is often used) I would probably react more positively. Also, if you do go ahead with merging this, there are a few minor style issues that should be fixed before merging: double newlines in the code example, and the text change is missing an apostrophe (and should be two separate sentences, IMO). |
|
@tbekolay The change I proposed is a bandaid. Apostrophe accepted though. :-) |
|
I think this is important to introduce this particular bit of pythonic syntax. But maybe it can go in the |
Fix validation of motivation.md
|
I suggest introducing multiple assignment in the function lesson as a way to return several variables. As for fixing this exercise, I am ok with assigning all first, second, ... variables individually. |
|
I agree that this material would be best in another place, but since we have this material let's merge it for now; we can always move it later. I'll fix the apostrophe and move the multiple assignment comment to the main text in the merge. |
In the challenge 'Sorting out references' multiple assignment is used without any previous mention. I have added the use of assigning multiple values to multiple variables in the numpy methods section. I understand that this is introducing two new concepts at the same time (methods and multiple assignment).
It does allow the student to chunk the three descriptive statistics though so is might lower the load on working memory
The other options are to: