[Gareth McCaughan] > Since > > def f(a,b,*c): ... > f(1,2,3,4,5) > > does (in effect) a=1, b=2, c=(3,4,5), I suggest that > > a,b,*c = 1,2,3,4,5 > > should do a=1, b=2, c=(3,4,5) too. Likewise, > > a,b,c,d,e = 1,2,*(3,4,5) > > should be parallel to > > def f(a,b,c,d,e): ... > f(1,2,*(3,4,5)) > This just strikes me as YAGNI. I have never felt the need to have this kind of assignment outside of parameter passing. If this kind of assignment is that big of a deal you can just use slicing. I realize the same argument can be used for parameter arguments, but the reason for having *args and **kwargs is to allow more general functions and I just don't feel this is needed for assignment. This might all seem rather weak and vague, but my gut is just saying this is not a good idea. So -1 from me unless this feeling is from indigestion. -Brett
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4