[issue29089] dictionary keys described incorrectly in tutorial

2016-12-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: 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

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-28 Thread R. David Murray
R. David Murray added the comment: You know, it might actually not be a bad idea to use a slightly different color scheme for the tutorial. We'll see if that idea generates any interest :) -- ___ Python tracker _

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread Xezlec
Xezlec added the comment: > Perhaps the sentence about a tuple pointing to a mutable could be tightened > up, though, by saying that if a tuple points to something that can not itself > be a dictionary key, then that tuple can not be a dictionary key. That would be great. Thank you. > I feel

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread INADA Naoki
INADA Naoki added the comment: > If precision is the problem, could it be reworded to be more vague? "can be any immutable" seems vague enough to me. It doesn't say "cannot be any mutable type.". > Users are likely to assume documentation from any official source is the > final word. But t

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread R. David Murray
R. David Murray added the comment: It is not wrong. It does not say that keys are limited to immutables, only that immutables can be keys. Perhaps the sentence about a tuple pointing to a mutable could be tightened up, though, by saying that if a tuple points to something that can not itself

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread Xezlec
Xezlec added the comment: > It's the tutorial. Probably better to just leave it alone. Precise > understanding can come later. But the problem isn't that it's imprecise. It's flat-out wrong. My opinion would be that it's always a bad idea to put wrong information in the documentation, esp

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread INADA Naoki
INADA Naoki added the comment: > It's the tutorial. Probably better to just leave it alone. Precise > understanding can come later. I agree. Beginner should start using dict with builtin immutable type as key. hashable is too complex at this point. -- nosy: +inada.naoki

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread R. David Murray
R. David Murray added the comment: Note that this applies equally well to python3. -- title: Python 2 dictionary keys described incorrectly -> dictionary keys described incorrectly in tutorial versions: +Python 3.6, Python 3.7 ___ Python tracker