3 ©ft` ã @ s8 d dl mZ d dlmZ ddd„Zddd„Zdd „ Zd S ) é )Úunicode_literals)Úlongú c C s° ddddddddd g }|r d }nd}d}d }t |ƒd }| dkrDd} x$| |krh||k rh|d }| | } qFW t| tƒs~t| tƒr„d}n| dk r’d}nd}|t| p d ƒ||| f S )añ Return a human-readable metric-like string representation of a number. :param number: the number to be converted to a human-readable form :param SI: If is 0, this function will use the convention that 1 kilobyte = 1024 bytes, otherwise, the convention that 1 kilobyte = 1000 bytes will be used :param space: string that will be placed between the number and the SI prefix :return: a human-readable metric-like string representation of *number* r ÚkÚMÚGÚTÚPÚEÚZÚYg @�@g �@iç r é Ng z%i%s%sgfffffæ#@z%.1f%s%sz%.0f%s%s)ÚlenÚ isinstanceÚintr Úfloat) ZnumberZSIZspaceZsymbolsÚstepZthreshÚdepthZ max_depthÚformat© r ú/usr/lib/python3.6/format.pyÚ format_number s4 r c C sx | dks| dk r|rdS dS nV| t dƒkr.dS t| ƒ} | d }| d } |rh|d }|d }d||| f S d || f S dS ) aÆ Return a human-readable string representation of a number of seconds. The string will show seconds, minutes, and optionally hours. :param seconds: the number of seconds to convert to a human-readable form :param use_hours: If use_hours is 0, the representation will be in minutes and seconds. Otherwise, it will be in hours, minutes, and seconds :return: a human-readable string representation of *seconds* Nr z--:--:--z--:--ÚinfZInfiniteé<