Paul Rubin wrote:
Yves Dorfsman <[EMAIL PROTECTED]> writes:
import time
y, None, d, None, None, None, None = time.localtime()

I know you can't assign anything to None, but I'm sure you get what I
mean, a special keyword that means I don't care about this value.

You can just use a variable name than you ignore.  It's traditional to
use _ but it's not a special keyword, it's just a another variable name:

   y, _, d, _, _, _, _, _, _ = time.localtime()

But you still have have a variable that's using memory for nothing. I find this unsatisfactory... I don't want to compare languages, but I find the perl "undef" elegant.


Yves.
http://www.SollerS.ca
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to