Python Forum
User-defined function to reset variables?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User-defined function to reset variables?
#3
(May-25-2022, 03:05 PM)Gribouillis Wrote: This is why classes were invented: to group in a single entity variables shared by different places. So create a class (or several classes) to hold the variables

I've studied some intro stuff about classes, but they really confuse me (along with all the syntax like the __init__, the self, etc.). Can you explain this in a simpler way? If I clearly understand their place and am convinced it's worth doing, then I'll force myself through it and figure it out.
Reply


Messages In This Thread
RE: User-defined function to reset variables? - by Mark17 - May-25-2022, 07:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 684 Nov-23-2023, 02:53 PM
Last Post: rob101
  Printing the variable from defined function jws 7 1,520 Sep-03-2023, 03:22 PM
Last Post: deanhystad
  How to print variables in function? samuelbachorik 3 980 Dec-31-2022, 11:12 PM
Last Post: stevendaprano
Information How to take url in telegram bot user input and put it as an argument in a function? askfriends 0 1,202 Dec-25-2022, 03:00 PM
Last Post: askfriends
  Getting NameError for a function that is defined JonWayn 2 1,182 Dec-11-2022, 01:53 PM
Last Post: JonWayn
Question Help with function - encryption - messages - NameError: name 'message' is not defined MrKnd94 4 3,064 Nov-11-2022, 09:03 PM
Last Post: deanhystad
  How to print the output of a defined function bshoushtarian 4 1,405 Sep-08-2022, 01:44 PM
Last Post: deanhystad
  Multiple user defined plots with secondary axes using for loop maltp 1 1,573 Apr-30-2022, 10:19 AM
Last Post: maltp
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 1,584 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  Setting permanent user variables in Windows coder420 2 1,478 Jan-04-2022, 10:42 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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