Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3 get rid of xrange in graphs folder #21530

Closed
fchapoton opened this issue Sep 18, 2016 · 11 comments
Closed

py3 get rid of xrange in graphs folder #21530

fchapoton opened this issue Sep 18, 2016 · 11 comments

Comments

@fchapoton
Copy link
Contributor

using instead six.moves.range

only in .py files

CC: @tscrim @jm58660 @a-andre @jdemeyer

Component: python3

Author: Frédéric Chapoton

Branch/Commit: 4ff72b5

Reviewer: Jori Mäntysalo

Issue created by migration from https://trac.sagemath.org/ticket/21530

@fchapoton fchapoton added this to the sage-7.4 milestone Sep 18, 2016
@fchapoton
Copy link
Contributor Author

New commits:

631989bget rid of xrange in graph folder

@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/21530

@fchapoton
Copy link
Contributor Author

Commit: 631989b

@fchapoton
Copy link
Contributor Author

comment:2

green bot

@jm58660
Copy link
Mannequin

jm58660 mannequin commented Sep 22, 2016

Reviewer: Jori Mäntysalo

@jm58660
Copy link
Mannequin

jm58660 mannequin commented Sep 22, 2016

comment:4

Works.

[-2*t+i for i in range(2*t)] is not beatiful.

It is not needed to change g.add_vertices(range(11)), as add_vertices() can take an iterator. (Same does not apply to add_cycle(), but maybe it should.

What is the meaning of new_verts = [self.add_vertex() for i in range(k)]? add_vertex() has no return value.

list(range(20))[10:20] is odd.

Feel free to mark this as positive review without any changes, as this patch does not make any of those worst than they now are.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 22, 2016

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

4ff72b5trac 21530 some details, plus a few ....:

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 22, 2016

Changed commit from 631989b to 4ff72b5

@fchapoton
Copy link
Contributor Author

comment:6

ok, done. It seems that add_vertex sometimes return the number of the new vertex.

@jm58660
Copy link
Mannequin

jm58660 mannequin commented Sep 22, 2016

comment:7

Replying to @fchapoton:

ok, done.

OK. --> positive_review.

It seems that add_vertex sometimes return the number of the new vertex.

I didn't notice that.

@vbraun
Copy link
Member

vbraun commented Oct 3, 2016

Changed branch from u/chapoton/21530 to 4ff72b5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants