[Python-Dev] Iterators, map, xreadlines and docs
Moshe Zadka
moshez@zadka.site.co.il
Sat, 28 Apr 2001 12:07:43 +0300
On Sat, 28 Apr 2001 03:24:48 -0400, "Tim Peters" <tim.one@home.com> wrote:
> A confused user on c.l.py reported that while
>
> for x in file.xreadlines():
>
> works fine,
>
> map(whatever, file.xreadlines())
>
> blows up with
>
> TypeError: argument 2 to map() must be a sequence object
...
> I think that's a bug in map(). Anyone disagree?
I agree...but when we talked about it in c.l.py, I said that and you
said map() should be deprecated. Why the sudden change of heart?
why shouldn't it be changed to
[whatever(x) for x in file.xreadlines()]?
--
"I'll be ex-DPL soon anyway so I'm |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
-- Wichert Akkerman (on debian-private)| easier, more seductive.
For public key, finger moshez@debian.org |http://www.{python,debian,gnu}.org