Lecture Review: Major Restructuring of Advanced Python Programming Section, Task 2-3#218
Lecture Review: Major Restructuring of Advanced Python Programming Section, Task 2-3#218
Conversation
lectures/debugging.md
Outdated
| ```{index} single: Python; Handling Errors | ||
| ``` | ||
|
|
||
| Errors are problems within a program that stops the program from running further. |
There was a problem hiding this comment.
"stops" -> "stop"
Is this true? If they are caught in a try-except block, then execution continues?
|
Perhaps we should change the title "OOP I: Introduction to Object Oriented Programming" to "OOP I: Names and Objects" |
|
"Every object is bound by its name" Is this statement true? What about anonymous functions? How about "Zero, one or many names can be bound to a given object" ? |
Thanks for the thoughtful recommendation. Let's do as you say. Please see the comments above. |
|
Thanks @HumphreyYang . @mmcky , would you mind to help review this PR? Another set of eyes would be very helpful. PS I can't see an active deployment above --- I might be missing it. |
Thanks @HumphreyYang once you have made updates re: @jstac comments above - please tag me as a reviewer and I will do a second round review. @jstac they seem less obvious these days. You can click on |
Hi @mmcky, I have updated the lecture based on the review, could you please have a look at the current version and check if there are any changes I need to make? |
mmcky
left a comment
There was a problem hiding this comment.
Thanks @HumphreyYang I have added some inline suggestions and changes.
|
Thanks for collaborating @HumphreyYang and @mmcky . Please ping me directly (put a comment with @jstac) when you are ready for me to review. |
|
@jstac I think this is ready for review |
| If you just want to see the names, you can type | ||
|
|
||
| ```{code-cell} python3 | ||
| dir(math)[0:10] |
There was a problem hiding this comment.
Please add a comment # show the first 10 names
| * They have their own namespace called `__builtins__`. | ||
|
|
||
| ```{code-cell} python3 | ||
| dir()[0:10] |
There was a problem hiding this comment.
please add comment
# show the first 10 names in `__main__`
| ``` | ||
|
|
||
| ```{code-cell} python3 | ||
| dir(__builtins__)[0:10] |
There was a problem hiding this comment.
# show the first 10 names in `__builtins__`
|
Great work @HumphreyYang ! You've made some really big improvements here. I'm really pleased. @mmcky , many thanks for the careful review and all those suggestions. Just some very minor requests above. Also, in the lecture on debugging, could @HumphreyYang please mention that a visual debugger is available in JupyterLab: https://jupyterlab.readthedocs.io/en/stable/user/debugger.html You might add it as a note, if you like. (This is the best reason I've seen for switching to Jupyterlab. It seems they have been putting a lot of effort into the debugger.) @HumphreyYang , could you please add those small comments above, plus the mention of the visual debugger, and then ping @mmcky so he can merge. @mmcky , let's remember to tell @natashawatkins when this is published so that she can tweet the improvements. |
|
Hi @mmcky, Could you also have a look at the latest deployment here as well, and merge it if it looks good to you? Many thanks! |
Oh this looks good. @jstac in discussions with Rowan and the Curvenote team -- it looks like the jupyterlab myst extension is coming along nicely. this is another reason I think our switch is pretty imminent. I am starting to use it locally with the single notebook view. |
|
Thanks @jstac for review and @HumphreyYang for all your work on this. This looks great. |
Hi @jstac and @mmcky,
I finished task 2 and task 3 of #210.
Here is a summary of what I have done:
Restructure:
Additions:
Please kindly review these changes, and let me know if there is anything I need to change.
About moving Advanced Python Programming to Introduction to Python
np.arrayandmatplotlib.pyplot.subplots(see this section). Therefore, for the sake of clarity, it may be better if we leave the entire structure unchanged, or we can rewrite some of them without assumed knowledge.Could you also give your suggestions on this issue?
Many thanks in advance.