Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function arguments
#1
Are arguments passed to functions passed as data or a reference to data or does Python make that call behind the scenes?

curbie
Reply
#2
(Apr-29-2025, 01:44 AM)Curbie Wrote: Are arguments passed to functions passed as data or a reference to data
All arguments are passed by object reference. In CPython it means concretely that for each argument, the memory address of an existing Python object is passed for each argument (these objects are implemented as C structures).
« We can solve any problem by introducing an extra level of indirection »
Reply
#3
Thanks Gribouillis,

It was just for the sake of my mind's eye visualization.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Two arguments in input function Alfredd 4 735 Nov-09-2025, 12:56 AM
Last Post: Pedroski55
  calling external function with arguments Wimpy_Wellington 6 3,880 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  'namespace' shorthand for function arguments? shadowphile 5 4,411 Aug-11-2021, 09:02 PM
Last Post: shadowphile
  Checking the number of arguments a function takes Chirumer 3 3,603 Jul-06-2021, 04:56 PM
Last Post: Chirumer
  Possible to dynamically pass arguments to a function? grimm1111 2 3,577 Feb-21-2021, 05:57 AM
Last Post: deanhystad
  How to pass multiple arguments into function Mekala 4 4,144 Jul-11-2020, 07:03 AM
Last Post: Mekala
  How to give a name to function arguments in C-API? WonszZeczny 0 2,136 Jun-22-2020, 10:20 AM
Last Post: WonszZeczny
  Function Recognises Variable Without Arguments Or Global Variable Calling. OJGeorge4 1 3,458 Apr-06-2020, 09:14 AM
Last Post: bowlofred
  Pass Arguments to Function phillyfa 2 3,718 Mar-27-2020, 12:05 PM
Last Post: phillyfa
  Function with many arguments, with some default values medatib531 3 4,286 Mar-14-2020, 02:39 AM
Last Post: medatib531

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.