Gerrit <[EMAIL PROTECTED]> wrote:

> Apart from historical, compatibility reasons, why is
>
>    "foo %s bar %s" % [2, 4]
>
> illegal?
>
> I could imagine that anything accepting numerical values for __getitem__
> (foo[0], foo[1], ...) or that is iterable (foo.next(), foo.next()) could
> be sensibly used as a formatting rhs. Of course, it is not compatible
> because "foo %s" % [2, 4] is correct and "foo %s" % (2, 4) is not, but
> are there other reasons that it has been chosen like this?

so what should

    "foo %s bar %s" % "24"

do?

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to