Python Forum
Possible to create an object inside another object that is visible outside that objec
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible to create an object inside another object that is visible outside that objec
#8
The question means: I have a class that i want to instantiate and use by passing it to at least two other objects. But I don't want to instantiate that class in the main body, i would rather instantiate the class (create the object) inside another completely different object (possibly in its _init_ and share that instance with a completely seperate object.
Reply


Messages In This Thread
RE: Possible to create an object inside another object that is visible outside that objec - by MeghansUncle2 - May-24-2023, 05:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merge htm files with shutil library (TypeError: 'module' object is not callable) Melcu54 7 3,421 Mar-09-2025, 04:25 PM
Last Post: Pedroski55
  type object 'man' has no attribute 'centerX' Tempo 7 851 Mar-07-2025, 03:47 AM
Last Post: deanhystad
  float object can't be interpreted as an integer t23 2 913 Jan-18-2025, 07:36 PM
Last Post: deanhystad
  Storing DictProxy object and modifying its nested value? haihal 3 1,087 Dec-20-2024, 04:58 AM
Last Post: deanhystad
  Extract args=, value that was passed to Multiprocessing.Proc object during runtime? haihal 1 647 Dec-08-2024, 07:04 AM
Last Post: Gribouillis
  what is solution to save and reload a object? eue 4 2,088 Nov-23-2024, 02:15 PM
Last Post: DeaD_EyE
  Trying to get JSON object in python and process it further Creepy 2 1,032 Oct-24-2024, 08:46 AM
Last Post: buran
  How to move an object over time rather than instantly? temlotresid6 3 1,712 Oct-23-2024, 11:20 AM
Last Post: temlotresid6
  Forward __getattr__ to another object. deanhystad 1 770 Aug-30-2024, 07:16 AM
Last Post: Gribouillis
  How can I upload a .gz file to the Swift Object Storage using Python swift client? Hanginium65 0 759 Jul-24-2024, 03:24 PM
Last Post: Hanginium65

Forum Jump:

User Panel Messages

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