Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

variables/objects passed by reference/value

https://www.experts-exchange.com/questions/28479913/mutable-php-and-python.html?anchorAnswerId=40215341#a40215341

This is because in python (unlike php) all variables are passed by reference, so they are generally considered to be mutable, however because some variable types in python are more complex, then they are immutable

I have read Ray's variables vs references article many times but I can not relate to python
Please give a php and python example of how variables are passed by reference
And if immutable in python, is variable passed by value? Relate this to php please.
ASKER CERTIFIED SOLUTION
Avatar of pepr
pepr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
rgb192, , you may get experts to give you "Explanations" about programming things in python that may not relate to PHP at all.

If I may ask, what are you now trying to do in "python" programming (to lean it), that you have to ask this question, in other words, if you can be more specific in questions about learning python, then you may can get more helpfull answers.
Avatar of rgb192

ASKER

If I may ask, what are you now trying to do in "python" programming (to lean it)
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/


python basics illustrated part 3

I found part 2 but permission is denied
https://www.experts-exchange.com/Programming/Languages/Scripting/Python/A_6589-Python-basics-illustrated-part-2.html

and I can not find part 1


I will read part 3 but may not understand until I read part1 and part2 first.

I like the visual diagram of examples of references and variables.  Ray wrote an article in honor of me for php (but I can not find). And Ray's article sometimes would be blocked 'permission denied'.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pepr
pepr

@rgb192: The links were temporarily unreachable (titles were changed). The new or modified articles must be approved by the page editor/moderator. This is the reason why some articles may be unreachable until then. The Part 1 and 2 has still the status Editor review. It should work a bit later:

http:A_5354-Python-basics-illustrated-part-1.html
http:A_6589-Python-basics-illustrated-part-2.html
http:A_7109-Python-basics-illustrated-part-3.html

But the order of reading depends on your previous experience. Reading only part 3 may be fine. Parts 1 and 2 are not Python related -- just explaining what may be needed to understand part 3 for some. Just try and write feedback there.
The part 1 and 2 were republished (should be available now).
Avatar of rgb192

ASKER

thanks for pass by reference/value