[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Strange string.format result
- From: Rolf Kalbermatter <rolf.kalbermatter@...>
- Date: Sat, 26 Nov 2022 15:01:45 +0100
While the current behavior may seem unintuitive at first sight, I think it is very sane. A function can return 0, 1 or multiple values even in the same function. I often return an error status as first value and if that indicates success, more values can follow. Without the current behavior, the parameter assignment to a printf() style function would change at runtime depending on the outcome of the function call and that would be much more confusing and error prone than this clear and comprehensive behavior.