[Python-3000] Ordered mapping type for Python 3000? (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Tue Mar 27 22:13:27 CEST 2007


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



More information about the Python-3000 mailing list