>> But which do you like better: >> >> year, month, day = time.localtime()[0:3] >> >> or >> >> year, month, day, *dummy = time.localtime() >> Brett> In all honesty, the top one. The *dummy variable strikes me as Brett> cluttering the assignment variables. >From what little ELisp programming I did in the dim dark past, I would prefer the second variant written as year, month, day, *rest = time.localtime() Brett> The reason this kind of thing is okay for parameter passing is Brett> that you might have the possibility of extra arguments, but you Brett> want that possibility. This example, though, does not have that Brett> benefit since you know you don't want what ``dummy`` gets. Yes you do. You know it gets the stuff you don't care about. ;-) Skip
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