MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / mapping

Method mapping

DemoPrograms/Demo_Desktop_Widget_CPU_Gauge.py:23–36  ·  view source on GitHub ↗

Map function with extra argument, not for tuple. : Parameters func - function to call. sequence - list for iteration. argc - more arguments for func. : Return list of func(element of sequence, *argc)

(func, sequence, *argc)

Source from the content-addressed store, hash-verified

21
22class Gauge():
23 def mapping(func, sequence, *argc):
24 """
25 Map function with extra argument, not for tuple.
26 : Parameters
27 func - function to call.
28 sequence - list for iteration.
29 argc - more arguments for func.
30 : Return
31 list of func(element of sequence, *argc)
32 """
33 if isinstance(sequence, list):
34 return list(map(lambda i: func(i, *argc), sequence))
35 else:
36 return func(sequence, *argc)
37
38 def add(number1, number2):
39 """

Callers 6

__init__Method · 0.45
moveMethod · 0.45
__init__Method · 0.45
moveMethod · 0.45
__init__Method · 0.45
moveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected