MCPcopy Index your code
hub / github.com/python/cpython / DoubleVar

Class DoubleVar

Lib/tkinter/__init__.py:618–636  ·  view source on GitHub ↗

Value holder for float variables.

Source from the content-addressed store, hash-verified

616
617
618class DoubleVar(Variable):
619 """Value holder for float variables."""
620 _default = 0.0
621
622 def __init__(self, master=None, value=None, name=None):
623 """Construct a float variable.
624
625 MASTER can be given as master widget.
626 VALUE is an optional value (defaults to 0.0)
627 NAME is an optional Tcl name (defaults to PY_VARnum).
628
629 If NAME matches an existing variable and VALUE is omitted
630 then the existing value is retained.
631 """
632 Variable.__init__(self, master, value, name)
633
634 def get(self):
635 """Return the value of the variable as a float."""
636 return self._tk.getdouble(self._tk.globalgetvar(self._name))
637
638
639class BooleanVar(Variable):

Callers 4

test_defaultMethod · 0.90
test_getMethod · 0.90
test_get_from_intMethod · 0.90
test_invalid_valueMethod · 0.90

Calls

no outgoing calls

Tested by 4

test_defaultMethod · 0.72
test_getMethod · 0.72
test_get_from_intMethod · 0.72
test_invalid_valueMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…