#24727: ClearableFileInput masks useful exceptions in is_initial()
-------------------------------------+-------------------------------------
Reporter: bluezio | Owner:
Type: | berkerpeksag
Cleanup/optimization | Status: assigned
Component: Forms | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by berkerpeksag):
* owner: nobody => berkerpeksag
* status: new => assigned
* has_patch: 0 => 1
* cc: berker.peksag@… (added)
Comment:
Pull request: https://github.com/django/django/pull/6143
Actually, there is no reason to use `hasattr()` at all. `hasattr()` also
calls `PyObject_GetAttr` (like `getattr()`) in its implementation:
https://github.com/python/cpython/blob/d69ba698ea79bab7e6d14732d8bf6215b7b93f8b/Python/bltinmodule.c#L1061
and there is no significant speed difference between `hasattr()` and
`getattr()`.
I've also added a test for defining url as property. Previously, url was
defined as a class attribute in `FakeFieldFile()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/24727#comment:9>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.223a9e8616aae3558dbd728b28151598%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.