New submission from عبدالله شلي (Abdellah Chelli) <[email protected]>:
c/printf accepts this:
n=1;
printf("One hour.", n);
in other hand python/print rises an error:
n=1
print "One hour." % n
Exactly the % formatting operation.
(TypeError: not all arguments converted during string formatting)
This feature is very important when we come to I18n (translation using gettext).
As most translator don't know this work around "%i hour." or "(%i) One hour.".
This is not correct for many languages as I know like Arabic where they should
write some thing like "One hour." or "An hour.".
https://bugs.launchpad.net/python/+bug/341015
Could this fixed to have same behaviour as in c? More robust.
----------
components: Interpreter Core
messages: 102764
nosy: sneetsher
severity: normal
status: open
title: % formating - TypeError: not all arguments converted during string
formatting
type: behavior
versions: Python 2.5, Python 2.6, Python 3.1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8359>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com