Yep, remember(and found ) the mail - thats what got me to do something about this...
Which also reminds me provided syntax for simplest multiarg case is
- Code: Select all
a,b,c = [1,2,3] # rhs literal list
The patch on the ticket has a comment re what to do (uncomment and comment some code) if want exception generated for mismatch (greater) lhs args length
I'd agree that that case is possibly more likely to be an error.
For the case of a shorter arglist I'm not convinced of the utility of forcing the programmer to explicitly have to truncate the list when its unnecessary to get/provide the assignment values.
- easy to do or not its still an extra (nitpicking) step
If its a programmer error (missing arg in lhs variable name list) then a shorter set of assigned items is gonna be obvious from the missing variable later....
depends on whether you think programmer should do additional bookkeeping for being explicit to system or system should assume programmer knows what they're doing and do
with what it has
OK re 'for' and matching length of sequence objects...
Type inference works as well as assignmentExprs ( since it basically just rewrites the multi arg assignment to a stream of single assignments)
Not looked at auto unpacking KeyValuePair (it'll fall out of multiargs in 'for' on a Dict I expect )- step 2), have to look at Dictionary Entry.
Are you talking of autodetecting and rewriting the return types for (library) methods returning 'out' values or explicitly wrapping some selected candidates??
...