Newbie - How to iterate list or scalar ?
Richard Brodie
R.Brodie at rl.ac.uk
Tue Aug 8 06:05:27 EDT 2006
"Andy Dingley" <dingbat at codesmiths.com> wrote in message
news:1155030787.666942.277610 at m79g2000cwm.googlegroups.com...
> pluginVersionNeeded is a parameter passed into a method and it can
> either be a simple scalar variable, or it can be a list of the same
> variables.
The obvious question would be, "is there a good reason why you don't
change the API to always require a list?" Then you can just write:
myFunction( [scalarParameter] ) when you have only one variable.
More information about the Python-list
mailing list