Implicit lists

Delaney, Timothy tdelaney at avaya.com
Thu Jan 30 23:27:50 EST 2003


> From: Erik Max Francis [mailto:max at alcyone.com]
> 
> Wouldn't it be more appropriate to have _two_ functions, one 
> which takes
> a sequence, and one which takes a single object (and possibly simply
> wraps it in a one-element list and passes it to the sequence-taking
> function)?

Indeed. I can almost guarantee that at some time in the future, you will
pass a list, and then wonder why it didn't get wrapped in a list. At some
time, you will want this behaviour (treating the passed list as atomic).

Tim Delaney





More information about the Python-list mailing list