Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8790
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'subject:Python': 0.06; 'exception.': 0.09; 'from:addr:python': 0.09; 'subclass': 0.09; 'tuple': 0.09; 'type)': 0.09; 'subject:] ': 0.14; 'wrote:': 0.15; 'antoine': 0.16; 'arbitrarily': 0.16; 'element,': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'lookup': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr :python-list': 0.16; 'subject: \n ': 0.16; 'subject:set': 0.16; '\xe9crit': 0.16; '>>>': 0.16; 'header:In-Reply-To:1': 0.22; 'gregory': 0.23; 'suspect': 0.25; '(or': 0.25; 'raise': 0.28; 'objects': 0.28; 'received:84': 0.28; 'iterating': 0.30; 'types.': 0.30; 'hi,': 0.31; 'rather': 0.33; 'actually': 0.33; 'to:addr :python-list': 0.34; 'header:User-Agent:1': 0.34; 'difference': 0.34; 'implies': 0.35; 'reply-to:addr:python.org': 0.35; 'probably': 0.35; 'anything': 0.37; 'else': 0.38; 'case,': 0.38; 'case': 0.39; 'should': 0.39; 'to:addr:python.org': 0.39; 'back': 0.63; 'making': 0.66; 'exact': 0.69; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; '10:52': 0.84; 'beware': 0.84; 'subject:types': 0.84; 'fast,': 0.91 |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | AmcHAAgZEk5UXebj/2dsb2JhbABTmQmOc3eIfMEhhjYEly6LPw |
| Date | Mon, 04 Jul 2011 20:53:47 +0100 |
| From | MRAB <python@mrabarnett.plus.com> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: [Python-ideas] Allow isinstance second argument to be a set of types |
| References | <CAKCKLWzAgRujAXir8=ZhS2JCaUTzRmzbM9dmOhX_4HxdjH5mGg@mail.gmail.com> <4E11656B.4050908@canterbury.ac.nz> <CAKCKLWynB6-RoHzCnercTy103LKPqcS2fWCrMeyan2Z6BUz5cw@mail.gmail.com> <20110704172843.50c5b445@pitrou.net> <CAGE7PN+KBhEUg=KOxOBaF2=EEQ=Jt=Erq=si1cmYur8TbKtHuw@mail.gmail.com> <CAGE7PNJV0u_4KuQY8ShYpZCnXwEYUhHYAcxRwi6nXTGHgeYxmg@mail.gmail.com> <1309802125.3688.54.camel@localhost.localdomain> <CAGmFidbVGr-sVAzSgXu0SR5cjZgUGbhZBNqSAuWjJNOkjnL3qg@mail.gmail.com> |
| In-Reply-To | <CAGmFidbVGr-sVAzSgXu0SR5cjZgUGbhZBNqSAuWjJNOkjnL3qg@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | python-list@python.org |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.604.1309809227.1164.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1309809227 news.xs4all.nl 21867 [2001:888:2000:d::a6]:42558 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:8790 |
Show key headers only | View raw
On 04/07/2011 20:41, Amaury Forgeot d'Arc wrote:
> Hi,
>
> 2011/7/4 Antoine Pitrou<solipsis@pitrou.net>:
>> Le lundi 04 juillet 2011 à 10:52 -0700, Gregory P. Smith a écrit :
>>> note that a fast lookup implies exact type and not subclass making my
>>> point silly... at which point you're back to iterating so I suspect
>>> supporting arbitrary iterables is actually how this will be
>>> implemented regardless.
>>
>> Indeed. Note that the tuple case should remain fast, and therefore
>> special-cased (or the general list/tuple case, since the difference in C
>> is rather small).
>
> Arbitrary iterables, arbitrarily nested...
> beware of objects which are also their first element, like str('a')...
>
Probably not arbitrarily nested, just a type (type(t) is type) or an
iterable yielding types. Anything else would raise an exception.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [Python-ideas] Allow isinstance second argument to be a set of types MRAB <python@mrabarnett.plus.com> - 2011-07-04 20:53 +0100
csiph-web