bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) (GH-9957)

(cherry picked from commit 1deea5e53991b46351f6bb395b22365c9455ed88)
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index ff85f83..a6e8fb2 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -3750,7 +3750,7 @@
         select to commands. If the selection isn't currently in
         the spinbox, then a new selection is created to include
         the characters between index and the most recent selection
-        anchor point, inclusive. Returns an empty string.
+        anchor point, inclusive.
         """
         return self.selection("adjust", index)
 
@@ -3758,7 +3758,7 @@
         """Clear the selection
 
         If the selection isn't in this widget then the
-        command has no effect. Returns an empty string.
+        command has no effect.
         """
         return self.selection("clear")
 
@@ -3766,9 +3766,9 @@
         """Sets or gets the currently selected element.
 
         If a spinbutton element is specified, it will be
-        displayed depressed
+        displayed depressed.
         """
-        return self.selection("element", element)
+        return self.tk.call(self._w, 'selection', 'element', element)
 
 ###########################################################################
 
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index e4c9d33..3fb6411 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -474,6 +474,14 @@
         self.assertRaises(TypeError, widget.bbox)
         self.assertRaises(TypeError, widget.bbox, 0, 1)
 
+    def test_selection_element(self):
+        widget = self.create()
+        self.assertEqual(widget.selection_element(), "none")
+        widget.selection_element("buttonup")
+        self.assertEqual(widget.selection_element(), "buttonup")
+        widget.selection_element("buttondown")
+        self.assertEqual(widget.selection_element(), "buttondown")
+
 
 @add_standard_options(StandardOptionsTests)
 class TextTest(AbstractWidgetTest, unittest.TestCase):
diff --git a/Misc/NEWS.d/next/Library/2018-10-08-21-05-11.bpo-34936.3tRqdq.rst b/Misc/NEWS.d/next/Library/2018-10-08-21-05-11.bpo-34936.3tRqdq.rst
new file mode 100644
index 0000000..7c1f7bb
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-10-08-21-05-11.bpo-34936.3tRqdq.rst
@@ -0,0 +1,2 @@
+Fix ``TclError`` in ``tkinter.Spinbox.selection_element()``. Patch by
+Juliette Monsel.