[issue32501] Documentation for dir([object])

2020-12-24 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32501] Documentation for dir([object])

2018-01-06 Thread Matthew Cowles
Matthew Cowles added the comment: My thanks to David for the clarification. I don't find the logic he describes (but does not necessarily subscribe to!) persuasive in this case. In my opinion, "Let's be incorrect for the sake of simplicity," is not the way to

[issue32501] Documentation for dir([object])

2018-01-06 Thread R. David Murray
R. David Murray added the comment: I'm not sure, but the discussion I remember was that it would require changes to an awful lot of places in the docs that would make the docs harder to read. It is very seldom in normal Python coding that an object has a method that it

[issue32501] Documentation for dir([object])

2018-01-06 Thread Matthew Cowles
Matthew Cowles added the comment: If David is right and people have previously decided not to change wording like this, can someone explain why? As it stands, the meaning is clear and incorrect. -- nosy: +mdcowles

[issue32501] Documentation for dir([object])

2018-01-06 Thread Eric V. Smith
Eric V. Smith added the comment: It's described here: https://docs.python.org/3/reference/datamodel.html#special-lookup Maybe we should have a glossary entry for "special method lookup", and somehow link mentions like __dir__ to it? This is slightly different from

[issue32501] Documentation for dir([object])

2018-01-06 Thread R. David Murray
R. David Murray added the comment: This is a general property of dunder methods in python3, and I think we have chosen not to change the wording when this has come up in other contexts. I'm not sure, though. -- nosy: +r.david.murray

[issue32501] Documentation for dir([object])

2018-01-06 Thread Vladislavs Burakovs
New submission from Vladislavs Burakovs : Documentation page [1] says "If the object has a method named __dir__(), this method will be called and must return the list of attributes.". It seems that on Python 3.6 it only works if the *class* has a method named