[Python-checkins] [python/cpython] 397262: bpo-30296 Remove unnecessary tuples, lists, sets, ...

GitHub noreply at github.com
Thu May 18 10:35:58 EDT 2017


  Branch: refs/heads/master
  Home:   https://github.com/python/cpython
  Commit: 3972628de3d569c88451a2a176a1c94d8822b8a6
      https://github.com/python/cpython/commit/3972628de3d569c88451a2a176a1c94d8822b8a6
  Author: Jon Dufresne <jon.dufresne at gmail.com>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M Lib/_weakrefset.py
    M Lib/distutils/msvc9compiler.py
    M Lib/email/headerregistry.py
    M Lib/inspect.py
    M Lib/logging/config.py
    M Lib/multiprocessing/context.py
    M Lib/multiprocessing/forkserver.py
    M Lib/multiprocessing/sharedctypes.py
    M Lib/pathlib.py
    M Lib/pstats.py
    M Lib/symtable.py
    M Lib/tokenize.py
    M Lib/traceback.py
    M Lib/turtle.py
    M Lib/turtledemo/wikipedia.py
    M Lib/urllib/request.py
    M Tools/gdb/libpython.py
    M Tools/scripts/byext.py
    M Tools/unicode/makeunicodedata.py

  Log Message:
  -----------
  bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)

* Replaced list(<generator expression>) with list comprehension
* Replaced dict(<generator expression>) with dict comprehension
* Replaced set(<list literal>) with set literal
* Replaced builtin func(<list comprehension>) with func(<generator
  expression>) when supported (e.g. any(), all(), tuple(), min(), &
  max())




More information about the Python-checkins mailing list