[Checkins] SVN: z3c.form/trunk/src/z3c/form/browser/widget.pyRevert change 103644. The "complicated" algorithm preservesclass order, so doctests don't fail.

Roger Ineichen dev at projekt01.ch
Fri Sep 11 15:33:28 EDT 2009


Hi Dan, Vincent

> Betreff: Re: [Checkins] SVN: 
> z3c.form/trunk/src/z3c/form/browser/widget.pyRevert change 
> 103644. The "complicated" algorithm preservesclass order, so 
> doctests don't fail.
> 
> 2009/9/11 Vincent Fretin <vincent.fretin at gmail.com>
> 
> 
> 
> 	I'm sorry I broke the tests.
> 	But instead of reverting, maybe we can sort the list 
> and fix the doctests?
> 	self.klass = u' '.join(sorted(frozenset(parts)))
> 	
> 	It's just an idea, if you don't like it, I'm fine with 
> the current code. :-)
> 	
> 	
> 
> What's the general idea behind changing that? The original 
> algorithm is not so complicated and it has a somewhat feature 
> that it preserves the order in which classes were added, that 
> can be nice for rendered code readability in some cases 
> (however, I personally didn't ever needed that). Is there any 
> significant difference in performance?

Yes, It's a must to preserve the order of css klasses or we will
probably mess up all the nice CSS concepts used out there.

Regards
Roger Ineichen


> --
> WBR, Dan Korostelev
> 
> 



More information about the checkins mailing list