Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Suggestion: make sequence and map interfaces more similar Date: Thu, 31 Mar 2016 17:19:33 +0300 Organization: A noiseless patient Spider Lines: 15 Message-ID: <878u0yloga.fsf@elektro.pacujo.net> References: <56fb677f$0$11121$c3e8da3@news.astraweb.com> <56fba7d3$0$1616$c3e8da3$5496439d@news.astraweb.com> <56fbc518$0$1593$c3e8da3$5496439d@news.astraweb.com> <56fbf73d$0$1591$c3e8da3$5496439d@news.astraweb.com> <56fc8e09$0$1600$c3e8da3$5496439d@news.astraweb.com> <56fcfdc6$0$1612$c3e8da3$5496439d@news.astraweb.com> <56FD086F.2090301@rece.vub.ac.be> <87poualt87.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="26396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UQEyB+qYPngFS9YYZDYi+" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:6beMoYbNBQ4leL6Ln+IEW+14k6A= sha1:ynTSzFb8Q5393YxsVgKCiAzqe7E= Xref: csiph.com comp.lang.python:106163 Jussi Piitulainen : > operator.itemgetter(*selector)(fields) # ==> ('y', 'y', 'x') > > [...] > > operator.itemgetter(*selector)(field_dict) # ==> ('y', 'y', 'x') > > It's not quite the same but it's close and it works the same for > strings, lists, dicts, ... Not quite the same, but nicely found anyway. Marko