Opened 3 years ago

Closed 3 years ago

#21373 closed enhancement (fixed)

py3: get rid of imap (step 2/2)

Reported by: chapoton Owned by:
Priority: major Milestone: sage-7.4
Component: python3 Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 5eed2ab (Commits) Commit: 5eed2ab23d79fbb0da47d0fd5b7891b1ac190b20
Dependencies: Stopgaps:

Description

sequel of #21364

Change History (10)

comment:1 Changed 3 years ago by chapoton

  • Branch set to u/chapoton/21373
  • Commit set to dbce5944fd5a0f0fc9aa12aaf70de584ef18f076
  • Status changed from new to needs_review

New commits:

dbce594get rid of imap (step 2/2)

comment:2 Changed 3 years ago by tscrim

  • Status changed from needs_review to needs_work

I believe (almost?) all of these could be changed to foo(x) for x in bar.

comment:3 Changed 3 years ago by git

  • Commit changed from dbce5944fd5a0f0fc9aa12aaf70de584ef18f076 to 245e8843724fee0e9d33924fd68e0ad7d3f39448

Branch pushed to git repo; I updated commit sha1. New commits:

245e884trac 21373 avoiding some maps

comment:4 Changed 3 years ago by chapoton

  • Status changed from needs_work to needs_review

Not really. I have changed 3 of them where this is true.

Other are either iterators, or documentation explaining how to work with iterators, and cannot or should not be changed to avoid map.

In the file combinat/tutorial, I am sort of undoing a wrong move of mine in a previous ticket, that was not correct in the context of the explanations about iterators.

comment:5 Changed 3 years ago by tscrim

  • Branch changed from u/chapoton/21373 to u/tscrim/remove_imap-21373
  • Commit changed from 245e8843724fee0e9d33924fd68e0ad7d3f39448 to d3a2ab25f249d3ef3c5e9318b24461d3a5631eed
  • Reviewers set to Travis Scrimshaw

I've changed the ones that are iterators to either return a generator object or to do the iteration explicitly.


New commits:

d3a2ab2Using generators and stuff to avoid map.

comment:6 Changed 3 years ago by chapoton

ok, I see. Thanks. Looks good. Maybe one should also undo my change from xrange to range in src/sage/combinat/words/word_infinite_datatypes.py

otherwise, once the bot is green this is a positive review from me

comment:7 Changed 3 years ago by git

  • Commit changed from d3a2ab25f249d3ef3c5e9318b24461d3a5631eed to 5eed2ab23d79fbb0da47d0fd5b7891b1ac190b20

Branch pushed to git repo; I updated commit sha1. New commits:

5eed2abReverting xrange -> range change.

comment:8 Changed 3 years ago by chapoton

maybe it would be worth to revisit #21364 with the idea of trying to avoid map also there..

comment:9 Changed 3 years ago by chapoton

  • Status changed from needs_review to positive_review

ok, bot is green, I allow myself to set to positive review

comment:10 Changed 3 years ago by vbraun

  • Branch changed from u/tscrim/remove_imap-21373 to 5eed2ab23d79fbb0da47d0fd5b7891b1ac190b20
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.