|
Meta tags:
description=The 2to3 tool will automatically wrap calls to map, zip, and filter with list():
# Original:
zip( abc , 123 )
# After 2to3:
list(zip( abc , 123 ))
...but the tool misses some cases, if the call is followed by a trailer such as [0]:
# Skipped by 2to3:
zip( abc , 123 )[0]
This PR augments the lib2to3 fixers for map, zip, and filter to correctly handle such cases.
htt???/bugs.python.org/issue28837;
Headings (most frequently used words):
uh, oh, for, filter, navigation, apr, 2017, choose, reason, hiding, this, comment, bpo, 28837, fix, lib2to3, handling, of, map, zip, 24, footer, benjaminp, diff, view, menu, repository, there, are, no, files, selected, viewing, by, extension, stuarteberg,
Text of the page (most frequently used words):
self (46), new (43), file (41), node (33), this (32), map (29), results (28), the (26), for (26), args (25), check (24), line (24), list (24), clone (24), name (22), expand (21), abc (21), and (21), from (20), all (19), #filter (19), #lib2to3 (19), prefix (19), zip (18), syms (18), power (18), def (17), github (16), trailers (16), trailer (16), import (16), hidden (15), characters (15), unicode (15), that (14), lib (14), arglist (14), show (13), comment (13), diff (12), none (12), applied (11), open (11), there (11), reload (11), reason (11), number (10), bidirectional (10), learn (10), extra_trailers (10), you (9), while (9), change (9), more (9), tests (9), return (9), in_special_context (9), fixer_base (9), fixes (9), was (9), cannot (8), please (8), changes (8), what (8), test_fixers (8), call (8), loading (8), suggestion (7), suggestions (7), comments (7), code (7), about (7), view (7), any (7), children (7), listcomp (7), sign (7), below (6), review (6), class (6), conditionalfix (6), fixer_util (6), type (6), error (6), page (6), hide (6), quality (6), choose (6), hiding (6), copy (6), cpython (6), security (5), commit (5), down (5), original (5), contains (5), text (5), may (5), interpreted (5), compiled (5), differently (5), than (5), appears (5), editor (5), reveals (5), desktop (5), delete (5), edit (5), deletions (5), range (5), 2017 (5), your (5), can (4), not (4), pull (4), resolved (4), outdated (4), additions (4), transform (4), with (4), token (4), something (4), problem (4), apr (4), users (4), bergs (4), documents (4), workspace (4), git (4), tree (4), stuarteberg (4), get (4), files (4), 28837 (4), fix (4), handling (4), support (4), copilot (4), community (3), navigation (3), request (3), supported (3), add (3), batch (3), one (3), misc (3), acks (3), unchanged (3), join (3), len (3), lambda (3), test_prefix_preservation (3), bm_compatible (3), true (3), pygram (3), python_symbols (3), pytree (3), local (3), imports (3), fix_zip (3), else (3), reactions (3), sorry (3), went (3), wrong (3), low (3), duplicate (3), off (3), topic (3), abuse (3), spam (3), will (3), displayed (3), describe (3), others (3), contributor (3), markdown (3), link (3), benjaminp (3), fixmap (3), fix_map (3), fix_filter (3), whitespace (3), extension (3), issue (3), commits (3), bpo (3), merged (3), python (3), account (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), contact (2), status (2), privacy (2), terms (2), footer (2), now (2), single (2), viewing (2), because (2), toggle (2), 128 (2), test_zip_basic (2), super (2), xxx (2), rare (2), case (2), should (2), use (2), loop (2), here (2), foo (2), 2954 (2), warning (2), value (2), arg (2), map_none (2), append (2), should_skip (2), but (2), test_map (2), _check (2), before (2), after (2), have (2), seq (2), fixfilter (2), selected (2), apply (2), split (2), unified (2), failed (2), load (2), retry (2), jump (2), nbsp (2), insights (2), projects (2), actions (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), products (2), secret (2), perform, action, time, share, personal, information, manage, cookies, docs, 2026, inc, right, back, later, queued, merge, multi, pending, reviews, has, been, marked, must, existing, order, create, valid, applying, deleted, lines, only, per, subset, closed, invalid, were, made, annotations, notes, brice, berna, julian, berman, michel, van, den, bergh, stuart, berg, ezra, berch, bennett, benson, andy, bensky, andrew, bennetts, addition, test_zip_nochange, test_zip_trailers, 3138, 3167, test_zip, 3130, 3155, test_map_nochange, warns, 3066, 3096, test_map_basic, test_trailing_comment, test_map_trailers, 3022, 3035, test_filter_nochange, note, parens, around, test_filter_trailers, test_filter_basic, pattern, fixzip, truncates, shortest, sequence, multiple, arguments, convert, parent, simple_stmt, okay, thanks, explanation, hence, think, best, capture, whole, missing, let, know, fail, traceback, most, recent, last, 3036, 3031, assertequal, str, assertionerror, doesn, tokens, creates, them, scratch, result, fails, due, unpreserved, leave, above, then, could, written, instead, 100, need, argument, author, thread, map_lambda, pgen2, elif, filter_lambda, are, conversations, clear, filters, viewed, types, jan, calls, when, follo, 5cdd2db, select, changed, checks, conversation, into, patch, master, already, clicking, agree, our, occasionally, send, related, emails, statement, service, free, its, maintainers, question, project, items, requests, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
|