Loading ...
Sorry, an error occurred while loading the content.

70Re: [python-iter] Colon syntax: We barely knew thee...

Expand Messages
  • gzeljko
    Mar 3, 2001
    • 0 Attachment
      From: <qrczak@...>
      > Sat, 3 Mar 2001 11:23:31 +0100, gzeljko <gzeljko@...> pisze:
      >
      > > > Why not 3: Requires much internal magic to let such lazy list behave
      > > > in an almost-compatible way with the old regular list - not
      > > > sure if it can be done well at all. Breaks code which
      > > > expected type(dict.keys()) == types.ListType.
      > >
      > > Requires diferent evaluation of dict.keys() in diferent context.
      >
      > It does not. It would always be a lazy list, which provides both
      > a sequence protocol and an iteration protocol.

      a=some_dict.keys() # a going to be 'list'

      In others words, they 'must' implement complete list interface,

      1. without own backing store
      2. with own backing store on demand

      1. is clear concept, but here is imposible
      a[i] = something
      # can't be implemented with old meaning

      2. is confusing and impractical (IMHO)

      if-they-was-tuples-ly-y'rs-gzeljko
    • Show all 27 messages in this topic