Py_single_input and the side-effects...

Stephen Hansen me+list/python at ixokai.io
Thu Jun 17 17:51:23 EDT 2010


On 6/17/10 2:32 PM, Mark Lawrence wrote:
> Where is the use of _ in a script documented, I've searched all over and
> can't find it, guess I don't have the Midas touch with google? :)

Its purely a convention, and one that crosses language-bounds, and isn't
entirely universal even given that.

It just means 'placeholder that I care naught for'; its not a feature,
there's no code or any /ability/ to use it. Its the same as any other
variable name.

It just happens to be a name that conveys no meaning while being short
and visually distinct: except to say you don't care about what value
ends up there, consider it thrown away.

That the interactive interpreter happens to store the last value in a
variable of the same name doesn't really mean anything.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100617/1cc320ec/attachment-0001.sig>


More information about the Python-list mailing list