osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

base = 1024 if (gnu or binary) else 1000


Hi,

I read the source code of of `humanize/filesize.py' and find the 24 line 
writing as follows:

base = 1024 if (gnu or binary) else 1000

It seems this is not the standard usage of if ... else ....

Is this a variant of lambda or some others?  Could you please give me 
some more hints? 

Regards
-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.