On 2019-08-05 16:01, Hongyi Zhao wrote:
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
On 05/08/2019 16:01, Hongyi Zhao wrote:
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
It's a perfectly standard conditional *expression* (se