Skip to content

Hold context #10035

@kcrisman

Description

@kcrisman

Now that Pynac will support 'hold' of symbolic expressions, like

sage: tan(pi/12,hold=True)
tan(1/12*pi)

we might want a 'context' for this.
The ticket enables the following:

        sage: tan(1/12*pi)    
        -sqrt(3) + 2
        sage: with hold:
        ....:     tan(1/12*pi)
        ....:     
        tan(1/12*pi)
        
        sage: with hold:
        ....:     sin(0)
        ....:     cos(0)
        ....:     
        sin(0)
        cos(0)
        sage: hold.start()
        sage: sin(0)
        sin(0)
        sage: cos(0)
        cos(0)
        sage: hold.stop()
        sage: sin(0)
        0

Depends on #23820

CC: @burcin @eviatarbach

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 3ad332c

Reviewer: Emmanuel Charpentier

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions