-
-
Notifications
You must be signed in to change notification settings - Fork 674
Closed
Description
From the doc:
inject a variable into the main global namespace
INPUT:
- name - a string
- value - anything
EXAMPLES::
sage: from sage.misc.misc import inject_variable
sage: inject_variable("a", 314)
sage: a
314
This will be used in the upcoming "inject_shorthands" patch for symmetric functions #7777, and could be used in the various inject_variable code instead of manipulating directly globals() (which could be incorrect if not called directly from the interpreter/notebook.
CC: @sagetrac-sage-combinat
Component: user interface
Author: Nicolas M. Thiéry
Reviewer: Mike Hansen
Merged: sage-4.3.1.rc0
Issue created by migration from https://trac.sagemath.org/ticket/7776