Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
singleton using metaclass
#11
i don't quite well understand how could that work. what if i want the class to have methods?
Reply
#12
I think your question is not at all about singletons. I don't see the problem with defining a class with methods, properties, etc and the create a single instance. Why would there be a problem?
Reply
#13
because you wrote the class name and "pass". where would i decalre the methods?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Prefs class: singleton or something else? PatM 7 1,213 Dec-12-2022, 11:01 PM
Last Post: PatM
  initialisation and metaclass GuiOhm 1 1,820 Mar-09-2020, 03:30 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