Assigning to None
mwm at mired.org
Fri Jul 1 19:45:12 CEST 2005
Peter Hansen <peter at engcorp.com> writes:
> Mike Meyer wrote:
>> Yes. I once grabbed an old program that did assignments to None. But
>> that's always been a bad idea.
> What was the use case!?
Unpacking a tuple. Something like this:
(foo, bar, None) = gen_tuple(stuff)
I've never seen that usage anywhere else.
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list