I wish that [].append(x) returned [x]

Tobiah toby at tobiah.org
Tue May 1 16:45:00 EDT 2007


I wanted to do:

	query = "query text" % tuple(rec[1:-1].append(extra))

but the append() method returns none, so I did this:

	fields = rec[1:-1]
	fields.append(extra)
	query = "query text" % tuple(fields)

-- 
Posted via a free Usenet account from http://www.teranews.com




More information about the Python-list mailing list