what's the deal of "_" in Python?

phansen peter at engcorp.com
Fri Sep 17 00:24:17 CEST 2004


Yun Mao wrote:
> Can someone give me some pointers to the related docs? Thanks.

It's a variable name.  See http://docs.python.org/ref/identifiers.html

If you were hoping of a more elaborate answer, please refer to
http://groups.google.ca/groups?threadm=2moucmFo8dpdU1%40uni-berlin.de
and also give just a *little* more detail in your next question,
so we don't have to mindread about which use of "_" you are
talking about.  It's used as a standalone variable name, as a
prefix in several different ways, sometimes as a substitute for
self, and so on.  Which do you mean?

-Peter



More information about the Python-list mailing list