[Python-ideas] values in vs. values out

Luc Goossens luc.goossens at cern.ch
Thu Jan 13 15:30:26 CET 2011

Hi all,

There's a striking asymmetry between the wonderful flexibility in  
passing values into functions (positional args, keyword args, default  
values, *args, **kwargs, ...) and the limited options for processing  
the return values (assignment).
Hence, whenever I upgrade a function with a new keyword arg and a  
default value, I do not have to change any of the existing calls,  
whereas whenever I add a new element to its output tuple, I find  
myself chasing all existing code to upgrade the corresponding  
assignments with an additional (unused) variable.
So I was wondering whether this was ever discussed before (and  
recorded) inside the Python community.
(naively what seems to be missing is the ability to use the assignment  
machinery that binds functions' formal params to the given actual  
param list also in the context of a return value assignment)


More information about the Python-ideas mailing list