#21855 closed Cleanup/optimization (wontfix)
method prototypes in docs should have self as first argument.
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
For example, the has_perm and has_module_perms prototypes here:
https://github.com/django/django/blob/6f06c749b73abea84cd61a7bcfd1cc9732fbefe5/docs/topics/auth/customizing.txt#L739
Should say:
has_perm(self, perm, obj=None):
...
has_module_perms(self, app_label):
I guess it's implied by the fact they they are methods, but it would be clearer to just include the self argument.
Change History (6)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
p.s. Here's the sphinx recommendation not to include the self
parameter.
Note:
See TracTickets
for help on using tickets.
Thanks for the suggestion, but it's a common convention not to include them (even the official Python docs do not do so).