Simon Sun wrote: > Magnus Lycka wrote: > >>Is there something here I can't see, or did you just >>change a variable name and present that as another >>solution? > > Heh, I have use python for a very short time. Base your statements, I test > in python, found `_' is a valid variable name. So I don't know it is a just > a plain variable or like something pattern matching in Haskell.
_ is just a plain variable name in Python. It is sometimes when a variable is needed to receive a value that won't be used. So your example was correct and idiomatic but functionally identical to mine. Kent -- http://mail.python.org/mailman/listinfo/python-list