[PATCH 0/4] Speed improvement in fetch/clone

Robey Pointer robey at lag.net
Thu Jan 19 09:56:32 GMT 2006


On 18 Jan 2006, at 13:52, Goffredo Baroncelli wrote:

> +        pb = pb and pb or bzrlib.ui.ui_factory.progress_bar()

I wanna give a -1 to this line.  This construction (x and y or z) and  
its pitfalls is actually the reason the ternary operator was added to  
python 2.5 and even after long discussions about what it means, I  
*still* find it confusing.

A 4-line if/else will cost you screen real estate but win you the  
love of your fellow man. :)

robey





More information about the bazaar mailing list