Death to tuples!

jepler at jepler at
Tue Nov 29 16:26:53 CET 2005

On Tue, Nov 29, 2005 at 10:41:13AM +0000, Bengt Richter wrote:
> Seems like str.__mod__ could take an arbitary (BTW, matching length, necessarily?
> Or just long enough?) iterable in place of a tuple, just like it can take
> an arbitrary mapping object in place of a dict for e.g. '%(name)s'% {'name':'<name value>'}

What, and break reams of perfectly working code?

s = set([1, 2, 3])
t = [4, 5, 6]
u = "qwerty"
v = iter([None])
print "The set is: %s" % s
print "The list is: %s" % t
print "The string is: %s" % u
print "The iterable is: %s" % v

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list