[Python-Dev] Challenge about print >> None

David Ascher DavidA@ActiveState.com
Wed, 13 Sep 2000 09:24:12 -0700 (Pacific Daylight Time)

On Wed, 13 Sep 2000, Greg Ewing wrote:

> Fredrik Lundh <effbot@telia.com>:
> > "map(None, seq)" uses None to indicate that there are really
> > no function to map things through.
> This one is just as controversial as print>>None. I would
> argue that it *doesn't* mean "no function", because that
> doesn't make sense -- there always has to be *some* function.
> It really means "use a default function which constructs
> a tuple from its arguments".

Agreed. To take another example which I also find 'warty', 

	string.split(foo, None, 3)

doesn't mean "use no separators" it means "use whitespace separators which
can't be defined in a single string".

Thus, FWIW, I'm -1 on the >>None construct.  I'll have a hard time
teaching it, and I'll recommend against using it (unless and until
convinced otherwise, of course).