Death to tuples!

jepler at unpythonic.net jepler at unpythonic.net
Tue Nov 29 10:26:53 EST 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

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051129/867d9181/attachment.sig>


More information about the Python-list mailing list