#2430: Widgets should use lazy params initialization to prevent from
inconsistence
------------------------+---------------------------------------------------
Reporter: xaka | Owner: chrisz
Type: defect | Status: new
Priority: normal | Milestone: 1.1.x bugfix
Component: TG Widgets | Version: 1.0.9
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by chrisz):
xaka: Thanks for the clarifications. Your suggestion sounds good and your
patch looks ok.
As ChrisA already said, we decided to put only critical/security bugfixes
in 1.0, so I adapted the patch for TG 1.1. I also made a small performance
improvement - not that it matters much in this case, but generally
building a list comprehension for checking a condition on any of the items
is not a good idea. Use an ordinary for loop, and break as soon as the
condition is met. In Py 2.5 we could use `any()`, but TG 1.1 must run on
Py 2.4.
Btw, should we add `any()` and `all()` to turbogears.util so they will be
available under TG 2.4 as well?
Concerning the tests, they can be implemented very easily along the lines
of case 1 and case 2. xaka: We're a bit under time pressure to release TG
1.1, so if you want me to write the tests for you, let me know.
--
Ticket URL: <http://trac.turbogears.org/ticket/2430#comment:12>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en