# HG changeset patch # User Colin Macdonald # Date 1470781474 25200 # Node ID 5b9c008c1d05759b4e3816f589e4b8a1e23efac5 # Parent 6bba42371afabc5715565cfb758e68cc8aebfb7a Remove the @pyobject/fromPythonVarName static method * @pyobject/pyobject.m: Remove @pyobject/fromPythonVarName. diff -r 6bba42371afa -r 5b9c008c1d05 @pyobject/pyobject.m --- a/@pyobject/pyobject.m Tue Aug 09 15:15:57 2016 -0700 +++ b/@pyobject/pyobject.m Tue Aug 09 15:24:34 2016 -0700 @@ -32,30 +32,6 @@ id endproperties - methods (Static) - function x = fromPythonVarName (pyvarname) - # Warning: just for testing, may be removed without notice! - # If @var{pyvarname} is a string, its assumed to be a variable - # name, e.g., previously created with pyexec. This must exist - # at the time of construction but it can disappear later (we - # will keep track of the reference). - if (! ischar (pyvarname)) - error ("pyobject: currently we only take variable names as input") - endif - cmd = sprintf ([ ... - 'if not ("__InOct__" in vars() or "__InOct__" in globals()):\n' ... - ' __InOct__ = dict()\n' ... - ' # FIXME: make it accessible elsewhere?\n' ... - ' import __main__\n' ... - ' __main__.__InOct__ = __InOct__\n' ... - '__InOct__[hex(id(%s))] = %s' ], ... - pyvarname, pyvarname); - pyexec (cmd); - id = pyeval (["hex(id(" pyvarname "))"]); - x = pyobject (0, id); - endfunction - endmethods - methods function obj = pyobject (x, id)