-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Description
We introduce a new feature: user globals. The idea is to store somewhere a dictionary with the user-space globals which can then be used to inject global variables.
This ticket implements the framework for this and fixes this bug in cython_lambda
as proof-of-concept:
sage: a = 25
sage: f = cython_lambda('double x', 'sage.math.sin(x) + sage.a')
sage: f(10) # known bug
24.455978889110629
sage: a = 50
sage: f(10) # known bug
49.455978889110632
Executing this gives
sage: a = 25
sage: f = cython_lambda('double x', 'sage.math.sin(x) + sage.a')
sage: f(10)
Traceback (most recent call last):
...
KeyError: 'math'
Component: user interface
Author: Jeroen Demeyer
Branch/Commit: 704007e
Reviewer: Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/12446