[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-19 Thread Kirk Hansen
Kirk Hansen added the comment: Raymond: Thanks for essentially answering my stackoverflow question (if you are a member, and add most of your response, I'll accept it). I agree enough with your documentation statement. An entry in an FAQ would have been just as helpful to me as a note

[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-18 Thread Kirk Hansen
Kirk Hansen added the comment: I think it could make sense at the top of the intro. It could also make sense to have it sit https://docs.python.org/2.7/library/stdtypes.html?highlight=dict#mapping-types-dict and have the intro link to it, or vice-versa. Thoughts

[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-18 Thread Kirk Hansen
New submission from Kirk Hansen: I tried subclassing dict, and overriding its __setitem__ and __getitem__ and got some interesting results. See http://stackoverflow.com/questions/38362420/subclassing-dict-dict-update-returns-incorrrect-value-python-bug?noredirect=1#comment64142710_38362420