-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
ElementWrapper: A class for wrapping Sage or Python objects as Sage elements #5967
Comments
comment:1
This is broken:
Never check the return value of
since the value depends on memory location. I have had to fix this literally dozens of times in doctests. Cheers, Michael |
comment:2
This ticket also needs to be properly market with a marker so it is picked up for review. Another thing to fix is to get this file into the documentation. Unless it is in the documentation the vast majority of people will never know of its existence. Current policy is that every file that is well documented and 100% doctested belongs in the documentation. Cheers, Michael |
comment:3
Replying to @sagetrac-mabshoff:
Ok, will do. |
comment:4
Replying to @sagetrac-mabshoff:
Any suggestion for that marker?
Ok, will do. |
comment:5
Replying to @nthiery:
I meant the standard "[with patch, needs review]" :) Cheers, Michael |
comment:6
Replying to @sagetrac-mabshoff:
Oops, I was sure I had done this! |
comment:7
Done, and patch updated. Thanks Michael for your suggestions. |
comment:8
The tests of the patch pass when applied to sage-3.4.2. Besides the application to the category framework #5891, I give this patch a positive review! |
comment:10
Has anybody non-combinat signed off on this? Not that I don't trust Anne, but ... ;) Cheers, Michael |
comment:11
The uploaded patch adds a warning about the probable little change of interface in the near future (but after integration of the category patch). |
comment:12
I agree this looks good. The only caveat is that the docstring reads
where it probably should be "does not." |
Attachment: element_wrapper-5967-submitted.patch.gz |
comment:13
Replying to @robertwb:
Oops, indeed! Thanks. Patch updated. |
comment:14
Merged in 4.0.1.alpha0. |
Reviewer: Anne Schilling, Robert Bradshaw |
Author: Nicolas Thiery |
Merged: 4.0.1.alpha0 |
Changed author from Nicolas Thiery to Nicolas M. Thiéry |
This patch implements a simple class ElementWrapper for wrapping Sage
or Python objects as Sage elements, with reasonable default
implementations of repr, cmp, hash, etc. The typical use case is for
trivially constructing new element classes from preexisting Sage or
Python classes, with a containment relation.
This class is used extensively in the examples of the upcoming category framework patch #5891.
CC: @sagetrac-sage-combinat
Component: misc
Author: Nicolas M. Thiéry
Reviewer: Anne Schilling, Robert Bradshaw
Merged: 4.0.1.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/5967
The text was updated successfully, but these errors were encountered: