Opened 8 years ago

Closed 8 years ago

#15951 closed defect (fixed)

Fix last string exception for python3

Reported by: wluebbe Owned by:
Priority: minor Milestone: sage-6.2
Component: algebra Keywords: python3, exception, raise
Cc: Merged in:
Authors: Wilfried Luebbe Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 702e08b (Commits, GitHub, GitLab) Commit: 702e08bd0979141effd2e47b42f27e0b615a6691
Dependencies: Stopgaps:

Status badges

Description

sage/algebras/quatalg/quaternion_algebra.py

has in line 988 the (hopefully) last string exception (I found no other):

raise "base field must be rational numbers or number field".

These have been deprecated since long. They not accepted be Python 3.

Change History (5)

comment:1 Changed 8 years ago by wluebbe

  • Authors set to Wilfried Luebbe
  • Branch set to u/wluebbe/ticket/15951
  • Commit set to 462a4952401bc227b0003336ed3761365116c66e
  • Status changed from new to needs_review

comment:2 Changed 8 years ago by chapoton

Should rather be a ValueError?, in my humble opinion

comment:3 Changed 8 years ago by chapoton

  • Branch changed from u/wluebbe/ticket/15951 to u/chapoton/15951
  • Commit changed from 462a4952401bc227b0003336ed3761365116c66e to 702e08bd0979141effd2e47b42f27e0b615a6691
  • Reviewers set to Frédéric Chapoton

ok, I have made a branch with ValueError?. (plus a few pep8 details around)

If you agree with my branch, you cen set this to positive review


New commits:

702e08btrac #15951 correct one raise statement towards python3

comment:4 Changed 8 years ago by wluebbe

  • Status changed from needs_review to positive_review

I had selected TypeError after looking at the other raise statements in this module. But ValueError is nearly as good :-)

So the patch is fine for me.

comment:5 Changed 8 years ago by vbraun

  • Branch changed from u/chapoton/15951 to 702e08bd0979141effd2e47b42f27e0b615a6691
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.