Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105735
| Path | csiph.com!aioe.org!news.mixmin.net!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!feedme.news.telefonica.de!telefonica.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Marco Sulla <marcosullaroma@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Suggestion: make sequence and map interfaces more similar |
| Date | Sat, 26 Mar 2016 01:35:33 +0100 |
| Lines | 17 |
| Sender | elbarbun@gmail.com |
| Message-ID | <mailman.25.1458986375.28225.python-list@python.org> (permalink) |
| References | <mailman.34.1458721359.2244.python-list@python.org> <56f27d76$0$1600$c3e8da3$5496439d@news.astraweb.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de Kxpz2fC8/wyKW+nMJrrnaQUIdz6C4ki3ZIhFD151nGFg== |
| Return-Path | <elbarbun@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'anyway.': 0.04; 'sequences.': 0.07; 'cc:addr:python-list': 0.09; 'cc:name:python': 0.16; 'iterable': 0.16; 'parameter,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:interfaces': 0.16; 'subject:make': 0.16; 'useless': 0.16; 'wrote:': 0.16; 'sender:addr:gmail.com': 0.18; '>': 0.18; 'input': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'parameter': 0.22; 'suppose': 0.22; 'ease': 0.23; 'implemented': 0.24; 'header:In- Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'sequence': 0.27; 'interface': 0.29; 'code': 0.30; "i'd": 0.31; "can't": 0.32; 'noticed': 0.32; 'common': 0.33; 'add': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'generic': 0.35; 'but': 0.36; 'too': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'seem': 0.37; 'creation': 0.38; 'late': 0.38; 'received:209': 0.38; 'does': 0.39; 'subject:more': 0.61; 'introduce': 0.79; 'otten': 0.84; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:cc; bh=Ooyj6qBlCulmbFdOx7W6wfZdAMhZfXDBRp5OBFnieCE=; b=d590tiofq7b6ZK4ZqLHsTJc9qm5aFEy/6plCEXdny9Mtyut74NAYzbiFs82Ql0+E31 6igWFCZdqD+nzEecT9jm1+Gf0SylauBilbeL3a9QAk4YytM/3l8Tcd03d5sKQgdA3AY8 EEoEB8SeEseY/h4IBAE8U/6hupUjTDt1CiyNdTd0uP6+nosLQKNKW3Tcx9VzprBGUsnR UzFezNU7Nwco1ZY3v9ZaGX85/iqIsAk8audaZY+0wKQ+Q/FW9B0GOeSiFxngcaKrneyF A2PFlQ94yGhky7Ifkl/aexvEz/tlgHvrY5CELVbbN1Wy+q3FJZwbiPxbVwpxNl4QmBRN +diw== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:cc; bh=Ooyj6qBlCulmbFdOx7W6wfZdAMhZfXDBRp5OBFnieCE=; b=W3EEvtSUsfl89Aqi+LNN+GVxdnu0qpynylISSbZqjTJ3dwR9qQwOVJyLK1ZXFpBMHe g6baaShHXDMj9vaYAP6mdJQprs6K9KweGXSYS0uFOfqDU7BHB0QFTrVQS2Henjqz5+b9 M5npZOnk4hJp7dYABBL5Tam/ujiioY9rqYYZskP/n7gi9710g3bacpbcBKWRe25t9lAG 56vQ6I3ZOk2Iiabs9lojSGuOhYF7IirYgt0wEuXx89pTyI1R5STJ/7eap0iIQvSnF2CJ goI1XSQg4DC33ZholuSCx4Ww8s6MfUK6X/FavwI5AzX1ddE2ND4AQKUCfH0l2YTsd9zJ b9KQ== |
| X-Gm-Message-State | AD7BkJIVfVLdAicl47JuQPH0kUnFKU+L+R8yS/yFP4Rway9NwnF+j9MGgW4hXYDY2J15jOmp9p5BljYja2pWpg== |
| X-Received | by 10.50.28.72 with SMTP id z8mr1017391igg.44.1458952572422; Fri, 25 Mar 2016 17:36:12 -0700 (PDT) |
| In-Reply-To | <56f27d76$0$1600$c3e8da3$5496439d@news.astraweb.com> |
| X-Google-Sender-Auth | AcA6cGEEqeOV9sfdt1GnyQYjTBg |
| X-Mailman-Approved-At | Sat, 26 Mar 2016 05:59:33 -0400 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.21 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| 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> |
| Xref | csiph.com comp.lang.python:105735 |
Show key headers only | View raw
Peter Otten wrote: >> I noticed that the sequence types does not have these methods that the map >> types has: get(), items(), keys(), values(). >> It could seem useless to have them for sequences, but I think it will ease >> the creation of functions and methods that allow you to input a generic >> iterable as parameter, but needs to use one of these methods in case the >> parameter is a map. > It will also break existing uses of duck typing. Yes, I suppose it's too late to introduce these methods to sequences. I'd like to see vdict implemented anyway. It can't break old code and add a map type that has a common interface with sequences.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Suggestion: make sequence and map interfaces more similar "Marco S." <mail.python.org@marco.sulla.e4ward.com> - 2016-03-22 20:54 +0100
Re: Suggestion: make sequence and map interfaces more similar Steven D'Aprano <steve@pearwood.info> - 2016-03-23 22:26 +1100
Re: Suggestion: make sequence and map interfaces more similar Marco Sulla <marcosullaroma@gmail.com> - 2016-03-26 01:18 +0100
Re: Suggestion: make sequence and map interfaces more similar Steven D'Aprano <steve@pearwood.info> - 2016-03-26 22:41 +1100
Re: Suggestion: make sequence and map interfaces more similar Marco Sulla <marcosullaroma@gmail.com> - 2016-03-26 01:35 +0100
Re: Suggestion: make sequence and map interfaces more similar Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-26 10:29 +0000
csiph-web