| ▲ | jp57 3 hours ago | |
The author's expectations seem strange. Take another example:
I would not expect a and b to get different values. It would be very strange if using `[]` had different behavior than a function call in the same place. Am I out of step here? | ||
| ▲ | jibal 2 hours ago | parent [-] | |
What expectations? The author states right up front "I've known of this behavior for a long time". A somewhat trickier example of the same issue is using [] as a default parameter value ... though there are warnings about the problem with that (it's the same list on every call) throughout the documentation. | ||