Vineeth Mohan wrote:
Hi,
How are variables in python passed. By value or by referrence?
Neither.
What makes you think that value and reference are the only two choices?
See this Wikipedia article for a list of at least a dozen different
argument passing techniques:
http://en.wikipedia.o
"Vineeth Mohan" wrote
How are variables in python passed. By value or by referrence?
Neither, and trying to force a comparison to these traditional
styles will always lead to an exercise in frustration as you
find cases which don't quite fit..
Variables in Python are names that refer to obj
Hi,
How are variables in python passed. By value or by referrence? For
example if we consider a simple function below wherein the value of a
does not get modified in the main function.
def addition(a,b):
a = a+1
return a+b
if __name__ == '__main__':
a = 10
b = 15
addit