> I don't see anything here that can't be done by returning a dict, a 
> namedtuple (possibly with optional fields), or some other object with 
> named fields. They can be optional, they can have defaults, and you can 
> extend the object by adding new fields without breaking backwards 
> compatibility.

That assumes you knew before hand to do that. The question is about the normal 
situation when you didn't. 

Also you totally disregarded the call site where there is no way to do a nice 
dict unpacking in python. The tuple case is super special and convenient but 
strictly worse than having properly named fields. 

To me this question sounds like it's about dict unpacking with one special case 
to keep backwards compatibility. This should be possible with a simple dict 
subclass in some cases...

/ Anders
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to