#33179: Show helpful error message when first argument to shortcuts.render is
not
request
-------------------------------------+-------------------------------------
Reporter: Joel Sleppy | Owner: Joel
Type: | Sleppy
Cleanup/optimization | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* status: assigned => closed
* resolution: => wontfix
* component: Uncategorized => HTTP handling
* type: New feature => Cleanup/optimization
Comment:
While this sort of check can be useful, we have to be judicious. Type
checking prevents duck typing and also imposes a performance penalty. In
this case, I don't think the ease of debugging the usage mistakes
outweighs the drawback of an extra `isinstance` check on every request.
You can write to the DevelopersMailingList if you want to discuss the idea
with a wider audience.
--
Ticket URL: <https://code.djangoproject.com/ticket/33179#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.6b8731b3e62467fd668c2cf22790d9e2%40djangoproject.com.