Opened 2 years ago
Closed 2 years ago
#27885 closed enhancement (fixed)
Py3: symbolic/expression.pyx fix some errors
Reported by:  vklein  Owned by:  

Priority:  major  Milestone:  sage8.8 
Component:  python3  Keywords:  
Cc:  Merged in:  
Authors:  Vincent Klein  Reviewers:  Frédéric Chapoton 
Report Upstream:  N/A  Work issues:  
Branch:  7658b8e (Commits, GitHub, GitLab)  Commit:  7658b8ee363c2c4b619310cb90efa4b149c0c711 
Dependencies:  Stopgaps: 
Description (last modified by )
 Fix the errors
AttributeError: 'sage.symbolic.expression.Expression' object has no attribute '__nonzero__'
appearing in python3.
'__nonzero__'
is renamed into '__bool__'
in python3.
 Use #py2 #py3 tag to manage the difference of messages for
TypeError
when an object is not subscriptable.
 Fix the following doctest:
sage: Set([x + y < 0, x  y < 0]) {x + y < 0, x  y < 0}
The later used to randomly fail because the output order was not constant with python3.
Change History (9)
comment:1 Changed 2 years ago by
 Branch set to u/vklein/27885
comment:2 Changed 2 years ago by
 Commit set to 7cf1dab075cf06a166eb127b2aa58fef3b48ff5d
comment:3 Changed 2 years ago by
 Description modified (diff)
comment:4 Changed 2 years ago by
 Commit changed from 7cf1dab075cf06a166eb127b2aa58fef3b48ff5d to 2a2f195eda640a8a576d20f22de2ae35452e35f3
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2a2f195  Trac #27885: expression.pyx fix __nonzero__ ...

comment:5 Changed 2 years ago by
 Description modified (diff)
comment:6 Changed 2 years ago by
 Commit changed from 2a2f195eda640a8a576d20f22de2ae35452e35f3 to 7658b8ee363c2c4b619310cb90efa4b149c0c711
Branch pushed to git repo; I updated commit sha1. New commits:
7658b8e  Trac #27885: expression.pyx ...

comment:7 Changed 2 years ago by
 Status changed from new to needs_review
comment:8 Changed 2 years ago by
 Reviewers set to Frédéric Chapoton
 Status changed from needs_review to positive_review
ok, thx
comment:9 Changed 2 years ago by
 Branch changed from u/vklein/27885 to 7658b8ee363c2c4b619310cb90efa4b149c0c711
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Trac #27885: expression.pyx fix __nonzero__ ...