Skip to content

py3: minor fixes to sage.libs.ntl #24804

@embray

Description

@embray

Two unrelated but (I think) small updates in sage.libs.ntl. With these fixes (among others in unrelated modules) all the tests pass for sage.libs.ntl in my Python 3 branch.

The update to ntl_ZZ_pX allows it to take as an argument any object that implements the Sequence protocol, instead of just (list, tuple) exactly. To summarize, this means classes that implement at least __iter__, __len__, and __getitem__ (though to be clear, dict is is not a Sequence). This means, among other things, it can accept range objects without any additional fuss, and there were several examples of this usage in the tests.

Depends on #26769

CC: @vinklein @jhpalmieri @kiwifb

Component: python3

Keywords: ntl

Author: Erik Bray

Branch/Commit: public/ticket/24804 @ e2e31f3

Reviewer: Vincent Klein

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions