base = 1024 if (gnu or binary) else 1000

Hongyi Zhao hongyi.zhao at gmail.com
Mon Aug 5 11:01:10 EDT 2019


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 :.



More information about the Python-list mailing list