Coerce that can pay attention to type of operation
Martin von Loewis
loewis at informatik.hu-berlin.de
Tue Oct 3 11:19:50 EDT 2000
hzhu at yahoo.com (Huaiyu Zhu) writes:
> Or more generally,
>
> "%80.2.3.5s" % a == str(a, 80, 2, 3, 5)
> which could be used to format more complicated objects in a very clean and
> efficient way.
That does not look very clean to me: too much magic. Instead, I'd
write
"%s" % a.str(80,2,3,5)
I.e. I'd rather invoke an explicit function to pass arguments for
fancy formatting.
Regards,
Martin
More information about the Python-list
mailing list