[New-bugs-announce] [issue8359] % formating - TypeError: not all arguments converted during string formatting
عبدالله شلي (Abdellah Chelli)
report at bugs.python.org
Sat Apr 10 11:37:59 CEST 2010
New submission from عبدالله شلي (Abdellah Chelli) <sneetsher at gmail.com>:
c/printf accepts this:
printf("One hour.", n);
in other hand python/print rises an error:
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.".
Could this fixed to have same behaviour as in c? More robust.
components: Interpreter Core
title: % formating - TypeError: not all arguments converted during string formatting
versions: Python 2.5, Python 2.6, Python 3.1
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce