On Thu, Aug 6, 2015 at 4:34 AM, John Doe <z2...@bk.ru> wrote: > Can You, please, elaborate this "..Passing in Python is different than in C > or other languages..." > I hesitate, because this question is usually the fuel of flaming wars. So in short:
C can pass a value or a reference to a value (the address of the place in memory where the value is stored) Python passes an object -- everything in python is an object. If the object is mutable, and the function mutates it, those results will be seen outside the function. If the object is immutable, and the function tries to change its value, a new object is created with the new value. Its name is the name given in the parameter list -- not the name that the function was called with. When the function completes, that object is lost since the outer scoped named object wasn't changed. > 'Cause as far as I know - default major Python's implementation CPython is > written in C. What language is used for its implementation has nothing to do with its own specification. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor