Message284310
I'm going to concur with the other respondents on this. As a Python teacher, this is how I teach what should be used as a dictionary key.
While immutability and hashability aren't equivalent, it is a good first approximation. Also, even though it is true that you could make a hashable object that is mutable, it is generally a bad practice that leads to regrets.
I'm going to close this. If someone wants to change the styling of the tutorial, that can reasonably be discussed in another patch.
Thank you for your ideas, but we're going to pass on this one. The tutorial is a place where it can be counter-productive to 1) make discussions too long, 2) go into atypical practices, 3) add too many caveats in a effort to be overly precise, etc. Also, this part of the tutorial has been around for many years and has done a reasonably good job at educating its readers. |
|
Date |
User |
Action |
Args |
2016-12-30 05:32:30 | rhettinger | set | recipients:
+ rhettinger, r.david.murray, methane, docs@python, Xezlec |
2016-12-30 05:32:30 | rhettinger | set | messageid: <1483075950.07.0.237139587953.issue29089@psf.upfronthosting.co.za> |
2016-12-30 05:32:30 | rhettinger | link | issue29089 messages |
2016-12-30 05:32:29 | rhettinger | create | |
|