Your question has more to do with scoping and syntax.
in reply to perl equivalent of python's underscore?
- Python scoping is not like Perl's. It's similar, but forget about 'brackets'. It's about function defs and where they happen.
- The underscore '_' in Python is not special, it just happens to be a valid variable name. In conjunction with scoping, this has become short-hand for for a 'disposable' variable. Given the 'fill the slots' nature of assignment in Python, this turns out to be pretty useful, and therefore an idiomatic pythonic thing to do.
And yes, I've had to go play on the dark side here and there.