Python Forum
function that run once for all objects
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function that run once for all objects
#7
(Oct-14-2021, 03:22 PM)ndc85430 Wrote: You still haven't explained why you want to do this, or what's wrong with calling a method on the instance you want to use. It sounds like you've come up with a solution to a problem, but we don't know what the problem is, so are hard pressed to judge whether it's an appropriate one. On the face of it, it just seems odd to me to have instances know about each other.
the proplem was stated in the first few lines : I want to make the usage of the class much easier. The file is downloaded once for all objects. __init__ was not helping so I thought there is easier solution. I also didn't want the user of the class to call a specific method for getting the file downloaded.
Reply


Messages In This Thread
RE: function that run once for all objects - by mr_byte31 - Oct-14-2021, 05:03 PM

Forum Jump:

User Panel Messages

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