RE: [PATCH 4/6] git-p4: Decode byte strings before printing

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

 



> If the new minimum python version will be 3.6 or above I'd vote for using f-
> Strings instead of .format() which I think are more readable and are also
> supposed to be faster.

Time passes so fast - I would prefer to use f-strings, but I didn't realise that they were universally available yet. They're still a "new thing" as far as I'm concerned.

I would prefer f-strings, I just used the str.format() method as a middle-ground.

> So:
> sys.stdout.write(f'\r{file_path} --> {rel_path} ({size/1024/1024} MB)\n')

By the way, I have a patch coming soon that can print the size in human readable units: b, kb, Mb, Gb etc. rather than always converting it to Mb.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux