Py_single_input and the side-effects...
Mark Lawrence
breamoreboy at yahoo.co.uk
Thu Jun 17 19:18:18 EDT 2010
On 17/06/2010 22:51, Stephen Hansen wrote:
> 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.
>
>
Thanks Stephen, don't think I'll lose any sleep over it then. :)
Cheers.
Mark Lawrence.
More information about the Python-list
mailing list