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

Update how variables are handled in Python? #18

Open
peterdcasey opened this issue Dec 14, 2022 · 2 comments
Open

Update how variables are handled in Python? #18

peterdcasey opened this issue Dec 14, 2022 · 2 comments

Comments

@peterdcasey
Copy link

I would volunteer to help update the text to correctly describe how variables are handled in Python. In the text the idea of variables as containers holding values is incorrect. This approach completely falls apart when mutable types are used, particularly when passed to functions. Students moving on from this text (using the "containers" concept) have difficulty shifting their thinking to the "pointers to objects" idea. Mutable vs. immutable types should also be introduced.

I am recently retired from teaching programming for 40 years.

Thank you, Peter

@pvcraven
Copy link
Owner

Pointers are introduced in 16.4, and a bit with arrays as well:
https://learn.arcade.academy/en/latest/chapters/16_classes/classes.html#using-objects-in-functions

For an intro course, I think some introduction to pointers is necessary, but I'm not sure I'm on-board with huge changes to overly complicate intro material. What exactly did you have in mind? I try to hit CS1 material here, but not worry much about CS2.

Immutable vs. mutable should be added somewhere, I'd agree with that.

@peterdcasey
Copy link
Author

peterdcasey commented Dec 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants