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

Set_PythonType_class: don't use custom element_constructor #23900

Closed
jdemeyer opened this issue Sep 20, 2017 · 8 comments
Closed

Set_PythonType_class: don't use custom element_constructor #23900

jdemeyer opened this issue Sep 20, 2017 · 8 comments

Comments

@jdemeyer
Copy link

If we want to remove the element_constructor argument to Parent.__init__, we should fix this:

cdef class Set_PythonType_class(Set_generic):
    [...]
    def __init__(self, theType):
        [...]
        Set_generic.__init__(self, element_constructor=theType, category=Sets())
        self._type = theType

This is easily done by defining an _element_constructor_ method.

This branch also changes "type" to "class" in the documentation and __repr__ to prepare for Python 3 (which consistently uses "class" in the __repr__ of types).

CC: @simon-king-jena

Component: misc

Author: Jeroen Demeyer

Branch/Commit: e6469c5

Reviewer: Frédéric Chapoton

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

@jdemeyer jdemeyer added this to the sage-8.1 milestone Sep 20, 2017
@jdemeyer
Copy link
Author

@jdemeyer
Copy link
Author

Commit: e6469c5

@jdemeyer
Copy link
Author

New commits:

e6469c5Implement `_element_constructor_` for Set_PythonType_class

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@jdemeyer

This comment has been minimized.

@fchapoton
Copy link
Contributor

comment:4

ok

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Sep 22, 2017

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

3 participants