You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, __str__ automatically finds a suitable unit. Some people have said they don't like this behavior, and would rather see it printed "as-is" (like __repr__ does).
Perhaps it would be wise to implement __format__, allowing users to choose a unit or use * for auto-conversion. Examples:
f'{download_speed}'# use the current unitf'{download_speed:*}'# automatically find the most suitable unitf'{download_speed:*/s}'# find a suitable unit given the constraint `/s`
The text was updated successfully, but these errors were encountered:
Currently,
__str__
automatically finds a suitable unit. Some people have said they don't like this behavior, and would rather see it printed "as-is" (like__repr__
does).Perhaps it would be wise to implement
__format__
, allowing users to choose a unit or use*
for auto-conversion. Examples:The text was updated successfully, but these errors were encountered: