Duncan Booth wrote:
Gary Herron wrote:
It's naive to think this question even makes sense. There are many ways
f can be called which don't involve a parameter:
f(42)
f(time())
f(a+123)
f(sin(a))
f(f(1))
and so on.
So long as the OP doesn't care if they get no names or several na
Gary Herron wrote:
> It's naive to think this question even makes sense. There are many ways
> f can be called which don't involve a parameter:
>
> f(42)
> f(time())
> f(a+123)
> f(sin(a))
> f(f(1))
>
> and so on.
So long as the OP doesn't care if they get no names or several name that
mig
Gary Herron wrote:
Hellmut Weber wrote:
Hi,
consider the following piece of code, please
- -
def f(param):
nameOfParam = ???
# here I want to access the name of the variable
# which was given as parameter to the function
print nameOfParam, param
return
if __name__ == __main
Hellmut Weber wrote:
Hi,
consider the following piece of code, please
- -
def f(param):
nameOfParam = ???
# here I want to access the name of the variable
# which was given as parameter to the function
print nameOfParam, param
return
if __name__ == __main__:
a = 1
f(a)
Hellmut Weber wrote:
Hi,
consider the following piece of code, please
- -
def f(param):
nameOfParam = ???
# here I want to access the name of the variable
# which was given as parameter to the function
print nameOfParam, param
return
if __name__ == __main__:
a = 1
f(a)
* Hellmut Weber:
consider the following piece of code, please
- -
def f(param):
nameOfParam = ???
# here I want to access the name of the variable
# which was given as parameter to the function
print nameOfParam, param
return
if __name__ == __main__:
a = 1
f(a)
b = '
On Tue, Jan 26, 2010 at 3:48 AM, Hellmut Weber wrote:
> Hi,
>
> consider the following piece of code, please
>
> - -
>
> def f(param):
> nameOfParam = ???
> # here I want to access the name of the variable
> # which was given as parameter to the function
> print nameOfParam, param
> r
Hi,
consider the following piece of code, please
- -
def f(param):
nameOfParam = ???
# here I want to access the name of the variable
# which was given as parameter to the function
print nameOfParam, param
return
if __name__ == __main__:
a = 1
f(a)
b = 'abcd'
f(a)