Closed fchapoton closed 6 years ago
Branch: u/chapoton/24249
LGTM
Reviewer: Salvatore Stella
Sorry, but I have to disagree here.
As I have mentioned several times before, you should really avoid "fixing" doctests. For example, matrix.diagonal(range(n))
really should work. If it doesn't work, then fix matrix.diagonal()
to accept iterables instead of "fixing" the doctest. Fixing the doctests will actually make it harder to port to Python 3 because it just hides issues.
Branch pushed to git repo; I updated commit sha1. New commits:
5120785 | trac 24249 diagonal matrix of range |
Can we please have a separate ticket for the issues of diagonal_matrix(range(n))
and matrix([range(n)])
? Stuffing this in a Python 3 ticket isn't practical for the discussion.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
387df43 | py3: some minor care for range |
I undid the change about diagonal matrices.
Same comment for giac.py
: fix the code instead of the doctest.
Really ? Do we really want to accept lists of range ?
Replying to @fchapoton:
Really ? Do we really want to accept lists of range ?
Of course, why not? It's the obvious generalization of a list of lists.
The natural abstraction from lists would probably be to support any sized Collection.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
4642af3 | correct one range, plus pep8 details |
ok, I undid also the other change in giac.
now, this contains only one correction to range "in the code", plus a pep8 cleanup of the onlyu modified file.
Let's try again
Changed branch from u/chapoton/24249 to 4642af3
part of #16081
Component: python3
Author: Frédéric Chapoton
Branch/Commit:
4642af3
Reviewer: Salvatore Stella
Issue created by migration from https://trac.sagemath.org/ticket/24249