Skip to content

Add print_mode='digits-unicode' to p-adic numbers #41219

@user202729

Description

@user202729

Problem Description

Currently we have

sage: Zp(2, 10, print_mode='digits')(5)
...0000000101

this causes some "issues" with doctest (it matches too liberally)… because ... is a special marker that stands for "arbitrary string".

Proposed Solution

Implement the following

sage: Zp(2, 10, print_mode='digits-unicode')(5)
…0000000101

that uses the Unicode character instead of 3 ASCII dots ....

Afterwards, the tests can be modified to use this print mode instead of the default one.

There's one precedent of this in src/sage/rings/valuation/limit_valuation.py (although _base_valuation is a private member).

Alternatives Considered

Motivated by looking at https://github.com/sagemath/sage/pull/41194/files

Additional Information

No response

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

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