Static Variables in Python?

Cliff Wells cliff at develix.com
Mon Jul 31 16:37:02 EDT 2006


On Mon, 2006-07-31 at 13:02 -0700, Cliff Wells wrote:


> @attrs ( bits = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] )

Also, IMO, it's a bit more readable to write:

bits = [ 0 for i in range ( 16 ) ]

which avoids the necessity of counting the zeros to know how many there
are.

Regards,
Cliff


-- 




More information about the Python-list mailing list