Opened 17 years ago

Closed 17 years ago

#5031 closed (wontfix)

Replace Try/except block with pop method with default

Reported by: zigiDev@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) 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

Replace try/except block around pop call with a pop which provides a default (as to match the pop call in the penultimate else clause for this block). I'm pedantic. :)

Attachments (1)

kwargsPop.diff (931 bytes ) - added by zigiDev@… 17 years ago.
Patch

Download all attachments as: .zip

Change History (2)

by zigiDev@…, 17 years ago

Attachment: kwargsPop.diff added

Patch

comment:1 by Adrian Holovaty, 17 years ago

Resolution: wontfix
Status: newclosed

If I may be pedantic right back... :-)

The problem with this patch is that this statement:

kwargs.pop(field.attname, field.get_default())

...causes field.get_default() to be executed in any case. We're avoiding that by doing another try/except.

Note: See TracTickets for help on using tickets.
Back to Top