Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85803
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'read-only': 0.09; 'conformance': 0.16; 'container.': 0.16; 'containers': 0.16; 'docstring': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'integers.': 0.16; 'length.': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'sequence.': 0.16; 'wrote:': 0.18; '(the': 0.22; 'header:User-Agent:1': 0.23; 'comparing': 0.24; 'instance,': 0.24; 'string,': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; "doesn't": 0.30; 'container': 0.31; 'so-called': 0.31; 'view.': 0.31; 'subject:the': 0.34; 'agree': 0.35; 'definition': 0.35; 'objects': 0.35; 'there': 0.35; 'object,': 0.36; 'virtual': 0.37; 'so,': 0.37; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'range': 0.61; 'kind': 0.63; 'here': 0.66; '2015': 0.84; 'approach.': 0.91 |
| X-CM-Score | 0.00 |
| X-CNFS-Analysis | v=2.1 cv=A/HiPsmG c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=Vhvw94NMJWsA:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=JK_szWkZA1w0K6TmkaUA:9 a=QEXdDO2ut3YA:10 |
| X-AUTH | mrabarnett@:2500 |
| Date | Wed, 18 Feb 2015 18:04:08 +0000 |
| From | MRAB <python@mrabarnett.plus.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: What the Pythons docs means by "container" ? |
| References | <71e8463f-2a60-4fb0-a5b7-0ca7cd3efece@googlegroups.com> <mailman.18794.1424209210.18130.python-list@python.org> <472c49ae-c2ce-4eda-b922-f16613722e31@googlegroups.com> <mailman.18798.1424220589.18130.python-list@python.org> <1d87da9c-ef64-4bd2-9179-e2aad908a9d0@googlegroups.com> |
| In-Reply-To | <1d87da9c-ef64-4bd2-9179-e2aad908a9d0@googlegroups.com> |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18826.1424282658.18130.python-list@python.org> (permalink) |
| Lines | 21 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1424282658 news.xs4all.nl 2883 [2001:888:2000:d::a6]:54619 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:85803 |
Show key headers only | View raw
On 2015-02-18 02:14, candide wrote: > Le mercredi 18 février 2015 01:50:16 UTC+1, Chris Angelico a écrit : > >> So, what's a container? It's a thing that you put other objects >> into. > > I agree with this approach. The important point to consider here is > the last word in your definition : "into". There is the container and > there is the content (the objects into). The so-called built-in > containers (list, string, etc) are in conformance with this view. > Now, regarding a range object as a container disagrees completely > with the definition given in the PLR : there is no contents and hence > there is no container. For instance, range(10**6) doesn't hold any > kind of object, there are no reference to the int objects 0, 1, 2, > ... As the range's docstring explains, range returns a VIRTUAL > sequence. > It's a virtual, read-only container that contains integers. Try comparing range(10) with tuple(range(10)). Both contain integers. Both have a length. Both can be indexed.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What the Pythons docs means by "container" ? candide <c.candide@laposte.net> - 2015-02-17 13:21 -0800
Re: What the Pythons docs means by "container" ? Cameron Simpson <cs@zip.com.au> - 2015-02-18 08:39 +1100
Re: What the Pythons docs means by "container" ? candide <c.candide@laposte.net> - 2015-02-17 16:30 -0800
Re: What the Pythons docs means by "container" ? Chris Angelico <rosuav@gmail.com> - 2015-02-18 11:49 +1100
Re: What the Pythons docs means by "container" ? candide <pascal.ortiz@gmail.com> - 2015-02-17 18:14 -0800
Re: What the Pythons docs means by "container" ? MRAB <python@mrabarnett.plus.com> - 2015-02-18 18:04 +0000
Re: What the Pythons docs means by "container" ? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-18 11:50 -0700
Re: What the Pythons docs means by "container" ? Ethan Furman <ethan@stoneleaf.us> - 2015-02-18 11:43 -0800
Re: What the Pythons docs means by "container" ? Terry Reedy <tjreedy@udel.edu> - 2015-02-18 15:04 -0500
Re: What the Pythons docs means by "container" ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-19 10:03 +1100
Re: What the Pythons docs means by "container" ? Ben Finney <ben+python@benfinney.id.au> - 2015-02-19 11:05 +1100
Re: What the Pythons docs means by "container" ? Chris Angelico <rosuav@gmail.com> - 2015-02-19 11:33 +1100
Re: What the Pythons docs means by "container" ? Terry Reedy <tjreedy@udel.edu> - 2015-02-17 19:54 -0500
Re: What the Pythons docs means by "container" ? perfectican <perfectican@gmail.com> - 2015-02-19 02:59 -0800
Re: What the Pythons docs means by "container" ? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-19 11:20 +0000
Re: What the Pythons docs means by "container" ? Rustom Mody <rustompmody@gmail.com> - 2015-02-20 03:37 -0800
Re: What the Pythons docs means by "container" ? Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-20 11:38 -0700
csiph-web