Introspecting the variable bound to a function argument
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Feb 23 01:15:59 EST 2023
On 23/02/23 9:12 am, Hen Hanna wrote:
> On Wednesday, February 22, 2023 at 2:32:57 AM UTC-8, Anton Shepelev wrote:
>> def f(a):
>> print(black_magic(a)) # or black_magic('a')
>>
>> f(v1) # prints: v1
>> f(v2) # prints: v2
>>
>
> the term [call by name] suggests this should be possible.
But Python doesn't use call-by-name or anything remotely like it.
(Even if it did, the word "name" in that context doesn't mean
what it sounds like it means. The Algol docs used some words in
weird ways.)
--
Greg
More information about the Python-list
mailing list