what does %u mean?
K.S.Sreeram
sreeram at tachyontech.net
Thu Jun 8 23:44:23 EDT 2006
yaru22 wrote:
> In the exercise in my book, it asks me to try print "%u" % (-5)
> I'm wondering what this %u mean?
Looks like there is *no* difference between '%u' and '%d' in Python.
Python 2.4.3 source code:
from stringobject.c, formatint function....
if (x < 0 && type == 'u') {
type = 'd';
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20060609/7a2dded4/attachment.sig>
More information about the Python-list
mailing list