[Tutor] What does "TypeError: 'int' object is not iterable"mean?
alan.gauld at btinternet.com
Sat Oct 23 14:38:54 CEST 2010
"Steven D'Aprano" <steve at pearwood.info> wrote
> It would have to be a *very* old version. The use of * as the width
> parameter in format strings goes back to the Dark Ages of Python
> I believe this is a virtual copy of string formatting from C, in
> case it probably goes back to the 80s or even the 70s.
This got me wondering so I dug out my copy of the original K&R (1978)
and there is no mention of * in the format specifiers description.
(There is for scanf but there it is a field suppressor)
I don't have an ANSI C version of K&R at home so can't say if it got
added as part of the ANSI C process - around 1990? - but neither
of my ANSI C books mention it either.
So it may not be a part of C after all.
Interesting, I wonder where it did first appear?
More information about the Tutor