Message399566
| Author | andrei.avk |
|---|---|
| Recipients | Windson Yang, andrei.avk, chris.jerdonek, docs@python, nedbat, orlnub123, pablogsal, rhettinger, roysmith, serhiy.storchaka, steven.daprano, terry.reedy, xtreak |
| Date | 2021-08-13.22:18:37 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1628893117.77.0.778465864519.issue35105@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
In the last message I've said that according to __dict__ docs, anything in __dict__ is an attribute of respective obj. That's a bit too-strongly worded, the docs can be understood in the sense that anything that ends up in __dict__ via other mechanisms, such as dotted notation or setattr(), is an attribute. Since direct manipulation of __dict__ is not prohibited, and no limits are set, AFAIK, on keys that can be used for __dict__, the more natural reading of the docs is that anything that can be directly set in __dict__ is also an attribute. The only thing that would make a user doubt this reading is if he or she finds that getattr() cannot get non-string attrs, and going by its name, user would assume you can get any valid attrs using getattr(). |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2021-08-13 22:18:37 | andrei.avk | set | recipients: + andrei.avk, rhettinger, terry.reedy, roysmith, nedbat, steven.daprano, chris.jerdonek, docs@python, serhiy.storchaka, pablogsal, Windson Yang, xtreak, orlnub123 |
| 2021-08-13 22:18:37 | andrei.avk | set | messageid: <1628893117.77.0.778465864519.issue35105@roundup.psfhosted.org> |
| 2021-08-13 22:18:37 | andrei.avk | link | issue35105 messages |
| 2021-08-13 22:18:37 | andrei.avk | create | |