> I believe the reason for immutable *args is one of optimization.

I think there is also a correctness issue at work. For an immutable
argument tuple, you can be sure that the tuple won't change "behind
you". That, in turn, means that PyArg_ParseTuple can return borrowed
references, so that C functions don't have to decref the arguments
the have fetched. If the argument tuple was mutable, that would
be much more risky.

Regards,
Martin


_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to