Changes between Initial Version and Version 1 of Ticket #27754, comment 2
- Timestamp:
- Jan 20, 2017, 3:24:37 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27754, comment 2
initial v1 1 1 `__dict__` is not a method, it's an attribute. All Python objects have it (except those that define `__slots__`). It does not make sense for Django to document that Django models have it, because a) it's a private attribute and an internal implementation detail of Python, that you should probably avoid relying on in your code, although many people use it anyway, and b) it's part of Python, not Django. If we documented every aspect of Python objects that happens to be true for Django objects too (because they are all Python objects), we'd be duplicating a bunch of the Python docs. 2 2 3 I don't know why PyCharm doesn't like you using `__dict__`; maybe because it's a private double-underscore attribute. You can point them to the Python documentation at https://docs.python.org/3/library/stdtypes.html#object.__dict__but there's nothing for Django to document here.3 I don't know why PyCharm doesn't like you using `__dict__`; maybe because it's a private double-underscore attribute. You can point them to the [[https://docs.python.org/3/library/stdtypes.html#object.__dict__ | Python documentation for it]], but there's nothing for Django to document here.