[Python-Dev] Half-baked proposal: * (and **?) in assignments (original) (raw)
Martin v. Loewis martin@v.loewis.de
23 Nov 2002 10:25:35 +0100
- Previous message: [Python-Dev] Half-baked proposal: * (and **?) in assignments
- Next message: [Python-Dev] Half-baked proposal: * (and **?) in assignments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Brian Quinlan <brian@sweetapp.com> writes:
Need is a bit too strong. But which do you like better:
year, month, day = time.localtime()[0:3] or year, month, day, *dummy = time.localtime()
lttime = time.localtime() year = ltime.tm_year month = ltime.tm_mon day = ltime.tm_mday
Readability counts.
Actually, you may just avoid the assignments altogether, and just use the named fields.
Regards, Martin
- Previous message: [Python-Dev] Half-baked proposal: * (and **?) in assignments
- Next message: [Python-Dev] Half-baked proposal: * (and **?) in assignments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]