XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.3.0
    • Impala 4.3.0
    • Infrastructure
    • None
    • ghx-label-7

    Description

      Dictionary methods like items, keys, values became lazy, similar to the other list functions. Existing code that relies on these methods producing lists immediately need to wrap the call in list(). The old iter* methods have been removed, so that code needs to be fixed up.

      See: https://python-future.org/compatible_idioms.html#dictionaries

      Replacing the iter* methods with the non-iter equivalent works fine in Python 3 (e.g. iteritems() becomes items()), but it is less efficient on Python 2. This is annoying, but since our Python code is not very performance sensitive and our intention is to remove Python 2, it doesn't seem useful to do complicated things to avoid it.

      This corresponds to these Pylint checks:

      dict-iter-method
      dict-keys-not-iterating
      dict-values-not-iterating

      Attachments

        Activity

          People

            joemcdonnell Joe McDonnell
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: