Django

Code

Ticket #4316 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

remove use of lambda for flatatt function

Reported by: Gary Wilson <gary.wilson@gmail.com> Assigned to: adrian
Milestone: Component: Forms
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Attachments

flatatt.diff (1.4 kB) - added by Gary Wilson <gary.wilson@gmail.com> on 05/16/07 14:57:10.
more readable, yes? Added a couple tests too.

Change History

05/16/07 14:57:10 changed by Gary Wilson <gary.wilson@gmail.com>

  • attachment flatatt.diff added.

more readable, yes? Added a couple tests too.

05/16/07 14:57:53 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_better_patch changed.
  • has_patch set to 1.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

05/16/07 15:55:20 changed 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.

05/16/07 16:03:48 changed by Gary Wilson <gary.wilson@gmail.com>

The lambda version has no docstring though.

05/19/07 13:49:35 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4316 (remove use of lambda for flatatt function)




Change Properties
Action