Opened 16 years ago
Closed 16 years ago
#10440 closed (wontfix)
attribute vs. method call
Reported by: | rihad | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
A quick suggestion:
Taken from http://www.djangobook.com/en/2.0/chapter07/
>>> f = ContactForm({'subject': 'Hello', 'email': 'adrian@example.com', 'message': 'Nice site!'}) """ >>> f.is_bound True >>> f.is_valid() True """
Why not hide internal details of the implementation by making all such calls either attributes/properties (cooler IMHO) or method calls?
Note:
See TracTickets
for help on using tickets.
For a start, because backwards-compatibility is requirement.
Methods tend to indicate that there's some non-trivial computation going on the background.