Opened 8 years ago

Closed 8 years ago

#4316 closed (fixed)

remove use of lambda for flatatt function

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

Description


Attachments (1)

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

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Gary Wilson <gary.wilson@…>

more readable, yes? Added a couple tests too.

comment:1 Changed 8 years ago by Gary Wilson <gary.wilson@…>

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 8 years ago by mtredinnick

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 Changed 8 years ago by Gary Wilson <gary.wilson@…>

The lambda version has no docstring though.

comment:4 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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