Tossing return values from functions (without -k option or printing)

Jim Roskind (jar@infoseek.com)
Fri, 1 Apr 1994 15:31:59 +0800

> Date: Fri, 01 Apr 94 15:10:26 EST
> From: Tim Peters <tim@ksr.com>
> Subject: Re: Why don't stringobjects have methods?
>
> > > [Tim suggested "f(x) and None" ]
> >
> > Jim Roskind wrote:
> > ... Hence for an *arbitrary* function,
> >
> > f(x) and None
> >
> > won't always go printless :-(.
>
> [f(x)] and None
>
> will.
>
> Tim Peters tim@ksr.com

Well, you used to have the faster hack method of doing it, but now...
at the cost (unless there's an optimizer) of a C-function call (make
it into a list) which potentially includes an object allocation (the
list, and its hidden pointer area), followed by lookup and evaluation
of None,.... I think we're back to about the level of the other two
hacks.

As I said, the obvious answer is a new statement. ...but perchance
this is a stylistic question of whether you like obfuscating hacks in
your code or not (sarcastic double <g>).

Jim

Jim Roskind
408-982-4469
jar@infoseek.com