Roundup Tracker - Issues

Message7635

Author rouilj
Recipients ber, chichi, rouilj
Date 2022-08-17.02:40:07
Message-id <1660704007.51.0.143225281961.issue2550559@roundup.psfhosted.org>
In-reply-to
Bern:

I implemented pretty(self, format="%0.3f").

One thing I didn't expect is that "%0.3f"%True is 1.000.

What should pretty return if the value is None, or can't be represented using the specified 
format parameter? 

I implemented "" for None and str(self._value) for anything else.

Does that work?

If the format is invalid (e.g. '%0.3') it raises a ValueError and that should
get handled like any other error.

changeset:   6832:234fefd7568a
History
Date User Action Args
2022-08-17 02:40:07rouiljsetmessageid: <1660704007.51.0.143225281961.issue2550559@roundup.psfhosted.org>
2022-08-17 02:40:07rouiljsetrecipients: + rouilj, ber, chichi
2022-08-17 02:40:07rouiljlinkissue2550559 messages
2022-08-17 02:40:07rouiljcreate