why can't % operator use a list?

Erik Max Francis max at alcyone.com
Tue May 6 16:02:56 EDT 2003


Guy Middleton wrote:

> If would be nice  if the % operator could work on lists as well as
> tuples:

So that lists can be passed in as raw arguments.  This question could
then move on to custom sequence types, and then you've devolved into a
huge mess.  It's easy enough to convert your list -- or any user-defined
sequence type -- with the tuple function/type, anyway:

	S % tuple(L)

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ To be adult is to be alone.
\__/ Jean Rostand
    CatCam / http://www.catcam.com/
 What do your pets do all day while you're at work?  Find out.




More information about the Python-list mailing list