#36763: Replace if-None checks with ternary operator in TemplateDoesNotExist.init
-------------------------------------+-------------------------------------
Reporter: Pravin | Owner: Pravin
Type: | Status: assigned
Cleanup/optimization |
Component: Template system | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage:
TemplateDoesNotExist | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Youngkwang Yang):
* summary: Small code refactoring in TemplateDoesNotExist.__init__ =>
Replace if-None checks with ternary operator in
TemplateDoesNotExist.init
Comment:
since the codebase already uses the if-none pattern for initialization, I
don’t see any issues with clarity or consistency. so this seems more like
a matter of style preference.
what do you think?
--
Ticket URL: <
https://code.djangoproject.com/ticket/36763#comment:1>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.