Python Forum
Parameters for function in bind()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameters for function in bind()
#2
use partial, although I am just guessing as you didn't post enough code
from functools import partial
## rest of code
self.canvas.bind("<B1-Motion>", partial(self.move, i)) 
Reply


Messages In This Thread
Parameters for function in bind() - by kom2 - Apr-18-2019, 03:53 PM
RE: Parameters for function in bind() - by woooee - Apr-18-2019, 03:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to compare two parameters in a function that has *args? Milan 4 1,341 Mar-26-2023, 07:43 PM
Last Post: Milan
  function accepts infinite parameters and returns a graph with those values edencthompson 0 883 Jun-10-2022, 03:42 PM
Last Post: edencthompson
  How to bind a midi signal to tkinter? philipbergwerf 1 1,637 Feb-09-2022, 05:17 PM
Last Post: Gribouillis
  How can I write a function with three parameters? MehmetAliKarabulut 1 2,450 Mar-04-2021, 10:47 PM
Last Post: Larz60+
  Parameters aren't seen inside function Sancho_Pansa 8 2,983 Oct-27-2020, 07:52 AM
Last Post: Sancho_Pansa
  RuntimeError: Optimal parameters not found: Number of calls to function has reached m bntayfur 0 6,185 Aug-05-2020, 04:41 PM
Last Post: bntayfur
  Function parameters and values as string infobound 1 1,793 Jul-24-2020, 04:28 AM
Last Post: scidam
  function 2 inside function 1 parameters SheeppOSU 4 2,910 Apr-20-2019, 09:34 PM
Last Post: snippsat
  Parameters type in a function girbinho 2 2,762 Oct-09-2018, 10:36 PM
Last Post: micseydel
  Function parameters grkiran2011 2 2,741 Feb-10-2018, 01:18 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020