From 260f10cd6272ec5e4aa176b6e53aa901c0bd6f5a Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Tue, 23 Aug 2016 11:09:57 +0200 Subject: [PATCH] fixes options for Graphics3D builtins --- mathics/builtin/graphics.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mathics/builtin/graphics.py b/mathics/builtin/graphics.py index 2e8f847d4e..ea9b23a746 100644 --- a/mathics/builtin/graphics.py +++ b/mathics/builtin/graphics.py @@ -1439,6 +1439,13 @@ def __init__(self, content, evaluation): self.evaluation = evaluation self.elements = [] + builtins = evaluation.definitions.builtin + def get_options(name): + builtin = builtins.get(name) + if builtin is None: + return None + return builtin.options + def convert(content, style): if content.has_form('List', None): items = content.leaves @@ -1463,7 +1470,7 @@ def convert(content, style): elif head[-3:] == 'Box': # and head[:-3] in element_heads: element_class = get_class(head) if element_class is not None: - options = evaluation.definitions.builtin[head[:-3]].options + options = get_options(head[:-3]) if options: data, options = _data_and_options(item.leaves, options) new_item = Expression(head, *data)