Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

len()

0 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Tobiah

ungelesen,
27.01.2009, 17:30:2927.01.09
an
Just out of curiosity, why was len() made to
be it's own function? I often find myself
typing things like my_list.len before I
catch myself.

Thanks,

Toby

Gabriel Genellina

ungelesen,
27.01.2009, 18:16:0227.01.09
an pytho...@python.org

Pat

ungelesen,
31.01.2009, 13:27:0231.01.09
an

I'm surprised that no one responded to that question.

I keep making that mistake all the time myself.

Andreas Waldenburger

ungelesen,
31.01.2009, 14:16:4831.01.09
an
On Sat, 31 Jan 2009 13:27:02 -0500 Pat <P...@junk.net> wrote:

> Tobiah wrote:
> > Just out of curiosity, why was len() made to
> > be it's own function? I often find myself
> > typing things like my_list.len before I
> > catch myself.
> >
> > Thanks,
> >
> > Toby
>
> I'm surprised that no one responded to that question.
>

Huh? Gabriel Genellina replied about 46 minutes after it was posted.
Might it be that your newsserver is a bit laggy?

regards
/W

--
My real email address is constructed by swapping the domain with the
recipient (local part).

Pat

ungelesen,
04.02.2009, 09:38:0404.02.09
an
Andreas Waldenburger wrote:
> On Sat, 31 Jan 2009 13:27:02 -0500 Pat <P...@junk.net> wrote:
>
>> Tobiah wrote:
>>> Just out of curiosity, why was len() made to
>>> be it's own function? I often find myself
>>> typing things like my_list.len before I
>>> catch myself.
>>>
>>> Thanks,
>>>
>>> Toby
>> I'm surprised that no one responded to that question.
>>
> Huh? Gabriel Genellina replied about 46 minutes after it was posted.
> Might it be that your newsserver is a bit laggy?
>
> regards
> /W
>

Might be laggy. Who knows.

Why didn't you answer the len() question?

Marco Mariani

ungelesen,
04.02.2009, 10:02:0804.02.09
an
Pat wrote:

> Why didn't you answer the len() question?

It's a bit of a FAQ: len() cannot be a method of list objects because it
works on any sequence or iterable.

Tino Wildenhain

ungelesen,
04.02.2009, 11:19:1304.02.09
an Marco Mariani, pytho...@python.org

Thats only half of the truth :-)

len() can use some internal optimizations on certain objects
where sequences indeed have a len() method called __len__()

Regards
Tino

Gabriel Genellina

ungelesen,
04.02.2009, 13:50:1704.02.09
an pytho...@python.org
En Wed, 04 Feb 2009 12:38:04 -0200, Pat <P...@junk.net> escribió:
> Andreas Waldenburger wrote:
>> On Sat, 31 Jan 2009 13:27:02 -0500 Pat <P...@junk.net> wrote:
>>> Tobiah wrote:
>>>> Just out of curiosity, why was len() made to
>>>> be it's own function? I often find myself
>>>> typing things like my_list.len before I
>>>> catch myself.

>>> I'm surprised that no one responded to that question.


>>>
>> Huh? Gabriel Genellina replied about 46 minutes after it was posted.
>> Might it be that your newsserver is a bit laggy?
>

> Might be laggy. Who knows.
> Why didn't you answer the len() question?

Why should he? Why didn't you look for the answer yourself, after being
told that it existed? Why do you expect *us* to repeat ourselves again and
again? Don't be so lazy...

You can read all these posts using the mailing list
(pytho...@python.org), Usenet (comp.lang.python), Google Groups, and
many other mirrors. See this same thread in 3 different ways:

Google groups:
http://groups.google.com/group/comp.lang.python/t/247ec641c289a326/

Gmane:
http://permalink.gmane.org/gmane.comp.python.general/608346

Python.org:
http://mail.python.org/pipermail/python-list/2009-January/526500.html

and many others, like the "forum" look & feel provided by
www.velocityreviews.com

--
Gabriel Genellina

Terry Reedy

ungelesen,
04.02.2009, 14:11:2004.02.09
an pytho...@python.org

I didn't respond because it has been asked and answered before, so the
answer can be found in the google archives or even maybe the FAQ.

Pat

ungelesen,
08.02.2009, 07:51:3208.02.09
an
Gabriel Genellina wrote:
> En Wed, 04 Feb 2009 12:38:04 -0200, Pat <P...@junk.net> escribió:
>> Andreas Waldenburger wrote:
>>> On Sat, 31 Jan 2009 13:27:02 -0500 Pat <P...@junk.net> wrote:
>>>> Tobiah wrote:
>>>>> Just out of curiosity, why was len() made to
>>>>> be it's own function? I often find myself
>>>>> typing things like my_list.len before I
>>>>> catch myself.
>
>>>> I'm surprised that no one responded to that question.
>>>>
>>> Huh? Gabriel Genellina replied about 46 minutes after it was posted.
>>> Might it be that your newsserver is a bit laggy?
>>
>> Might be laggy. Who knows.
>> Why didn't you answer the len() question?
>
> Why should he? Why didn't you look for the answer yourself, after being
> told that it existed? Why do you expect *us* to repeat ourselves again
> and again? Don't be so lazy...
>

Why do *us* feel obligated to respond? Is there a gun pointed at your
heads forcing to giving a bellicose responses?

Who is this *us*? A secret society? An exclusive club?

New rule: If you don't like a question or a post, simply ignore it. We
don't enjoy your snarky repartee.

Pat

ungelesen,
08.02.2009, 07:54:1308.02.09
an

Yes, you did respond. Aren't you the one who wrote "Might be laggy"?

If you didn't feel like answering the question, why did you add an
utterly worthless post?

Andreas Waldenburger

ungelesen,
08.02.2009, 11:44:1408.02.09
an

No, I am. Pretty clear from the "From" header. ;)


> If you didn't feel like answering the question, why did you add an
> utterly worthless post?
>

There, there. Let's not get too excited, OK? I made an observation that
I felt might be beneficial to you (even if only marginally so). I did
not mean it as an insult. I'm sorry if it seemed that way.

Steve Holden

ungelesen,
08.02.2009, 12:00:5208.02.09
an pytho...@python.org

Right, well let's *all* calm down, and resolve not to bother making
posts that don't contribute something positive. It's not like this is a
low-bandwidth group, there's always plenty going on.

regards
Steve

who is still hoping that one day Xah Lee will post and *nobody* will
reply ...
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

0 neue Nachrichten