Thomas Grainger writes:

 > Right but it's not a status code - it's a callback that you *must*
 > call

OK.  Thing is, Serhiy was just saying "hey I did almost exactly that
(but minor technical detail)".  In your idiomatic usage, 'exit' is
almost invisible outside of the wrapped context manager.  I don't see
why anybody would care what order it's returned in Python (there might
be some argument in Lisp where multiple values return requires a
special API, but the primary value can be accessed as an ordinary
return value).

I guess instead of "return first what's needed, then what's wanted",
you could define it "return first the items needed elsewhere in that
API, then items you don't know what the user plans to do with them."
That would be a rule people could follow (and I certainly would not
have replied at all :-).
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7K2Q4XXOCTYWQVDY3SHV3F77W34THBGF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to