Opened 10 years ago
Closed 10 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 by , 10 years ago
Has patch: | set |
---|
comment:2 by , 10 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 388e79e9: