#32572: ResolverMatch.__repr__() doesn't handle functools.partial() nicely.
---------------------------------------+---------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: Bug | Status: assigned
Component: Core (URLs) | Version: dev
Severity: Normal | Keywords: __repr__
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+---------------------------
When a partial function is passed as the view, the `__repr__` shows the
`func` argument as `functools.partial` which isn't very helpful,
especially as it doesn't reveal the underlying function or arguments
provided.
Because a partial function also has arguments provided up front, we need
to handle those specially so that they are accessible in `__repr__`.
ISTM that we can simply unwrap `functools.partial` objects in
`ResolverMatch.__init__()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/32572>
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/050.932de70799942026be01b1b428220c84%40djangoproject.com.