Opened 9 years ago
Closed 9 years ago
#24493 closed New feature (fixed)
Add setdefault to BaseContext
Reported by: | Preston Timmons | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Since context defines other dict-like methods, it'd be nice if it supported setdefault, too. My use case is initializing the extends history in render_context if it exists, otherwise using the value that is already there.
It's not critical, but it makes things more readable.
Change History (3)
comment:1 Changed 9 years ago by
Has patch: | set |
---|
comment:2 Changed 9 years ago by
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In 388e79e9: