Opened 17 years ago

Closed 17 years ago

#4316 closed (fixed)

remove use of lambda for flatatt function

Reported by: Gary Wilson <gary.wilson@…> Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description


Attachments (1)

flatatt.diff (1.4 KB ) - added by Gary Wilson <gary.wilson@…> 17 years ago.
more readable, yes? Added a couple tests too.

Download all attachments as: .zip

Change History (5)

by Gary Wilson <gary.wilson@…>, 17 years ago

Attachment: flatatt.diff added

more readable, yes? Added a couple tests too.

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 17 years ago

It's a bit of a personal preference whether this is more readable or not. In some ways it now looks like it's quite complicated by taking up more space, when it's really just a one-line function. They even compile to exactly the same bytecode. So this is a line-ball.

Tests should definitely go in, though.

comment:3 by Gary Wilson <gary.wilson@…>, 17 years ago

The lambda version has no docstring though.

comment:4 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5291]) Fixed #4316 -- Added docstring and tests for django.newforms.utils.flatatt().
Thanks, Gary Wilson.

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