Changes between Initial Version and Version 1 of Ticket #27754, comment 2


Ignore:
Timestamp:
Jan 20, 2017, 3:24:37 PM (8 years ago)
Author:
Carl Meyer

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27754, comment 2

    initial v1  
    11`__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.
    22
    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.
     3I 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.
Back to Top