Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31672 > unrolled thread

Re: len() on mutables vs. immutables

Started byDemian Brecht <demianbrecht@gmail.com>
First post2012-10-18 11:38 -0700
Last post2012-10-18 11:38 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: len() on mutables vs. immutables Demian Brecht <demianbrecht@gmail.com> - 2012-10-18 11:38 -0700

#31672 — Re: len() on mutables vs. immutables

FromDemian Brecht <demianbrecht@gmail.com>
Date2012-10-18 11:38 -0700
SubjectRe: len() on mutables vs. immutables
Message-ID<mailman.2461.1350585508.27098.python-list@python.org>
On 10/18/2012 11:28 AM, Nick Cash wrote:
> It appears that list has len() complexity of O(1)
> source: http://wiki.python.org/moin/TimeComplexity
> It may be worth mentioning that lists in Python are implemented using arrays instead of linked lists.
>
> It's reasonable to assume that other built-in collection types would be similar, though I don't see anything explicitly saying so for bytearray.
>
> -Nick Cash

Thanks for the link, I don't believe I had seen that one before.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web