Skip to content
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

Support renaming of Functor (define _repr_(), not __repr__()) #16156

Closed
pjbruin opened this issue Apr 14, 2014 · 7 comments
Closed

Support renaming of Functor (define _repr_(), not __repr__()) #16156

pjbruin opened this issue Apr 14, 2014 · 7 comments

Comments

@pjbruin
Copy link
Contributor

pjbruin commented Apr 14, 2014

The class Functor and some of its subclasses define a __repr__() method which doesn't support renaming:

sage: F=IdentityFunctor(Rings())
sage: F
The identity functor on Category of rings
sage: F.rename('I')
sage: F
The identity functor on Category of rings

This ticket moves these methods to _repr_() so the standard SageObject.__repr__() is used, which makes renaming work at least for Python classes.

Component: categories

Keywords: repr renaming

Author: Peter Bruin

Branch/Commit: 4866cae

Reviewer: Jan Keitel

Issue created by migration from https://trac.sagemath.org/ticket/16156

@pjbruin pjbruin added this to the sage-6.2 milestone Apr 14, 2014
@pjbruin
Copy link
Contributor Author

pjbruin commented Apr 14, 2014

Commit: 6bc7e6c

@pjbruin
Copy link
Contributor Author

pjbruin commented Apr 14, 2014

Branch: u/pbruin/16156-Functor_repr

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 15, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

4866caetypographical fixes

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 15, 2014

Changed commit from 6bc7e6c to 4866cae

@sagetrac-jkeitel
Copy link
Mannequin

sagetrac-jkeitel mannequin commented Apr 16, 2014

comment:3

Hi, looks simple & good, so I'll put it to positive review.

@sagetrac-jkeitel
Copy link
Mannequin

sagetrac-jkeitel mannequin commented Apr 16, 2014

Reviewer: Jan Keitel

@vbraun
Copy link
Member

vbraun commented Apr 20, 2014

Changed branch from u/pbruin/16156-Functor_repr to 4866cae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants