Python Forum
function state between calls
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function state between calls
#6
counting the number of times a function is called was an example of saving state. it is not what i am trying the achieve.

what i want to do is save information/data between function calls. i have been using classes. i was wondering if there was also another way that could, perhaps, be simpler. i didn't think about generators, but yeah, as a separate context that persists, they have to be saving state.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
function state between calls - by Skaperen - Feb-07-2018, 02:20 AM
RE: function state between calls - by Windspar - Feb-07-2018, 02:40 AM
RE: function state between calls - by wavic - Feb-07-2018, 05:41 AM
RE: function state between calls - by Gribouillis - Feb-07-2018, 08:02 AM
RE: function state between calls - by Windspar - Feb-07-2018, 12:27 PM
RE: function state between calls - by Skaperen - Feb-08-2018, 02:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  asyncio calls within sync function ( Websocket on_open) orion67 0 1,542 Jan-16-2022, 11:00 AM
Last Post: orion67
  Calls to Attributes of a Class SKarimi 3 3,605 Apr-22-2021, 04:18 PM
Last Post: SKarimi
  list call problem in generator function using iteration and recursive calls postta 1 2,049 Oct-24-2020, 09:33 PM
Last Post: bowlofred
  RuntimeError: Optimal parameters not found: Number of calls to function has reached m bntayfur 0 6,341 Aug-05-2020, 04:41 PM
Last Post: bntayfur
  Need help with a function that calls other functions. skurrtboi 4 2,714 Sep-30-2019, 09:28 PM
Last Post: stullis
  State graph Kaluss 1 2,370 Mar-18-2019, 05:29 PM
Last Post: nilamo
  How to split a string containing function calls? Metalman488 4 3,034 Oct-27-2018, 06:50 PM
Last Post: Metalman488
  Testing function calls jenselme 1 2,776 Jul-25-2018, 10:33 AM
Last Post: Larz60+
  Is there another way to do a bunch of methods calls ? Windspar 7 4,990 Jan-02-2018, 06:26 PM
Last Post: Windspar
  Function calls inside a Class kerzol81 2 3,526 Mar-05-2017, 06:45 PM
Last Post: kerzol81

Forum Jump:

User Panel Messages

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