my favorite line of py code so far

Stefan Behnel stefan_ml at
Sat Nov 9 13:41:13 CET 2013

Peter Otten, 09.11.2013 12:49:
> There is no obvious meaning attached to _ -- so don't use it.

Not quite true. Depending on the context, the obvious meanings of "_" in
Python are either

1) "ignore me", e.g. in

    _, b = some_tuple


2) "this is a non-public thing", as in

    class Xyz:
        _private = 1


3) "I am the translation function", as commonly used in (HTML) templates:

    _("translation key here")

None of the three meanings applies to the OP's example, AFAICT.


More information about the Python-list mailing list