Python Forum
how to return a reference to an object?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to return a reference to an object?
#1
i have a collection of object references in a dict inside a function. i want to have a function that can use give arguments, find the object, and return a reference to it. i am drawing a blank trying to think this up. i want to have the caller increment the number if it's type is int or float and do nothing for anything else. nothing is coded, yet.
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
how to return a reference to an object? - by Skaperen - Jun-05-2023, 11:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Return a string or byte object from Enum class? Calab 5 747 May-14-2025, 05:21 PM
Last Post: snippsat
  This result object does not return rows. It has been closed automatically dawid294 5 5,844 Jan-10-2024, 10:55 PM
Last Post: deanhystad
Exclamation win32com: How to pass a reference object into a COM server class Alfalfa 3 7,036 Jul-26-2021, 06:25 PM
Last Post: Alfalfa
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 3,568 Sep-07-2020, 08:02 AM
Last Post: perfringo
  isinstance() always return true for object type check Yoki91 2 4,448 Jul-22-2020, 06:52 PM
Last Post: Yoki91
  Object reference in Dict - not resolved at runtime benthomson 2 2,685 Apr-02-2020, 08:50 AM
Last Post: benthomson
  set a new object node in a linked list via reference oloap 2 3,001 Mar-13-2020, 09:45 PM
Last Post: oloap
  Return a value when I equal an object from a class ihouses 4 4,214 Jul-10-2019, 02:44 AM
Last Post: SheeppOSU
  TypeError: cannot create weak reference to 'str' object Harryjduke 2 10,827 Mar-09-2019, 04:59 PM
Last Post: Harryjduke
  Return Object Created from Multiple Classes emerger 3 4,008 Oct-18-2018, 02:14 AM
Last Post: emerger

Forum Jump:

User Panel Messages

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