5 Dec
2011
5 Dec
'11
10:19 p.m.
On Tue, Dec 6, 2011 at 3:15 AM, Antoine Pitrou
That is, currently:
"{:.4x}".format(31) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: Precision not allowed in integer format specifier
This is so poorly discoverable that I don't think it's worth it. Guido's approach looks sufficient to me.
I agree the formatting approach is way too obscure, but did you see my later suggestion of an "as_twos_complement(bit_length)" conversion method on int objects? (we could actually provide a more generic version on numbers.Integer as well) Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia