why * is not like unquote (scheme)
Carl Banks
imbosol-1048171566 at aerojockey.com
Thu Mar 20 10:07:45 EST 2003
Peter Hansen wrote:
> Note that your other experiment with (1, 2, *(3, 4)) is also
> not currently supported, again because there's no function call
> involved, with the associated expansion of the tuple into a
> list of arguments. Again, no technical reason it couldn't
> be added to the language (well, not a major one, I believe)
> and it has been discussed before as a possibly desirable change
> (meaning nobody has tried to submit a patch yet ;-), but
> it is not currently supported.
I'm guessing "never."
If you want something like that, it's easy to use tuple addition.
And, if you must have * syntax, you can define a function to get
pretty much the same behavior:
def return_args(*args): return args
--
CARL BANKS
More information about the Python-list
mailing list