Opened 2 years ago
Closed 2 years ago
#27466 closed defect (fixed)
py3: modules/with_basis/morphism.py
Reported by: | jhpalmieri | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.7 |
Component: | python3 | Keywords: | |
Cc: | Merged in: | ||
Authors: | John Palmieri | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | e3d8e49 (Commits, GitHub, GitLab) | Commit: | e3d8e496b2361bcfe5607f76a3323d759e3b6d6d |
Dependencies: | Stopgaps: |
Description
Python 3 doctest fixes in modules/with_basis/morphism.py
Change History (4)
comment:1 Changed 2 years ago by
- Branch set to u/jhpalmieri/py3-morphism
comment:2 follow-up: ↓ 3 Changed 2 years ago by
- Commit set to e3d8e496b2361bcfe5607f76a3323d759e3b6d6d
- Status changed from new to needs_review
comment:3 in reply to: ↑ 2 Changed 2 years ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
Replying to jhpalmieri:
I don't know why in the first batch of examples,
loads(dumps(phi)) == phi
returnsFalse
in Python 3, but I put in what I hope is a suitable replacement.
My guess is that equality is done by comparing the defining functions, which after pickling are different (because of the different dict
s).
This change LGTM.
comment:4 Changed 2 years ago by
- Branch changed from u/jhpalmieri/py3-morphism to e3d8e496b2361bcfe5607f76a3323d759e3b6d6d
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
In
morphism.py
, it says:This seems to no longer be true in Python 3. In Python 2:
In Python 3:
I don't know why in the first batch of examples,
loads(dumps(phi)) == phi
returnsFalse
in Python 3, but I put in what I hope is a suitable replacement.New commits:
trac 27466: py3 changes in modules/with_basis/morphism.py