FAQ

On 04/07/2011 20:41, Amaury Forgeot d'Arc wrote:
Hi,

2011/7/4 Antoine Pitrou<solipsis at 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.

Search Discussions

  • Chris Rebert at Jul 4, 2011 at 8:09 pm

    On Mon, Jul 4, 2011 at 12:53 PM, MRAB wrote:
    On 04/07/2011 20:41, Amaury Forgeot d'Arc wrote:
    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.
    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.
    What about a type that is itself iterable (via metaclass magic)?
    Gotta consider the wacky edge cases.

    Cheers,
    Chris

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 4, '11 at 7:53p
activeJul 4, '11 at 8:09p
posts2
users2
websitepython.org

2 users in discussion

MRAB: 1 post Chris Rebert: 1 post

People

Translate

site design / logo © 2022 Grokbase