Opened 13 years ago
Closed 13 years ago
#16761 closed Cleanup/optimization (wontfix)
Overriding built-in symbol
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://docs.djangoproject.com/en/dev/howto/custom-management-commands/
This page informs us that we should override a built-in (help) symbol and specify a string to replace it for use in a Django command. while the short name 'help' is nice, it'd be great if we didn't override python globals and confuse new users. i'd love it if django could be a python consistent framework
Change History (2)
comment:1 by , 13 years ago
Component: | Uncategorized → Core (Management commands) |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing as wontfix; there's no horrible consequence for using the same name as a Python builtin, and because this is at class scope it doesn't override any other scope.
We can't break backwards compatibility here. One solution would be to look for either
help_str
orhelp
. Then people who don't want to shadow the built-in can usehelp_str
. It's still slightly backwards incompatible if someone, for any reason, has anhelp_str
variable defined for another purpose...Since the problem is really minor and the ticket doesn't come with a patch, I'm not convinced it's worth the hassle of developing and documenting a solution.