Opened 19 years ago
Closed 19 years ago
#3952 closed (invalid)
Patch to add 'has_key' function to SessionWrapper
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Contrib apps | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The SessionWrapper supports many common dict functions such as .get, contains and others, but has_key seems to have been overlooked
Attachments (1)
Change History (3)
by , 19 years ago
| Attachment: | session-has_key.patch added |
|---|
comment:1 by , 19 years ago
comment:2 by , 19 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Ah, I wasn't aware it was going away.
Note:
See TracTickets
for help on using tickets.
Use "in" to test for keys.
IIRC, has_key will be deprecated as of Python 2.6 and has been removed for Python 3000. The "k in dic" format is the preferred style for new code.