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
  calling external function with arguments Wimpy_Wellington 6 2,985 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  'namespace' shorthand for function arguments? shadowphile 5 3,664 Aug-11-2021, 09:02 PM
Last Post: shadowphile
  Checking the number of arguments a function takes Chirumer 3 3,001 Jul-06-2021, 04:56 PM
Last Post: Chirumer
  Possible to dynamically pass arguments to a function? grimm1111 2 2,937 Feb-21-2021, 05:57 AM
Last Post: deanhystad
  How to pass multiple arguments into function Mekala 4 3,464 Jul-11-2020, 07:03 AM
Last Post: Mekala
  How to give a name to function arguments in C-API? WonszZeczny 0 1,802 Jun-22-2020, 10:20 AM
Last Post: WonszZeczny
  Function Recognises Variable Without Arguments Or Global Variable Calling. OJGeorge4 1 3,070 Apr-06-2020, 09:14 AM
Last Post: bowlofred
  Pass Arguments to Function phillyfa 2 3,073 Mar-27-2020, 12:05 PM
Last Post: phillyfa
  Function with many arguments, with some default values medatib531 3 3,622 Mar-14-2020, 02:39 AM
Last Post: medatib531
  Using function *args to multiply multiple arguments allusernametaken 8 8,561 Nov-20-2019, 12:01 AM
Last Post: allusernametaken

Forum Jump:

User Panel Messages

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