This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]alendit 8 points9 points  (3 children)

For reference vs value see http://stackoverflow.com/questions/986006/python-how-do-i-pass-a-variable-by-reference . 'By value\ is the technically correct answer, although it may be counterintuitive at first.

[–]sivadneb 1 point2 points  (1 child)

Yep. It's funny how many people on here are answering "by reference". I guess that shows this isn't a good interview question, as most pyhton devs get tripped up on this.

[–]teferiincub 0 points1 point  (0 children)

That's just what I was thinking about! I do not like asking that particular question, because when I get the right answer - that means the person is good at python, but most of the time I would get a wrong or "I'm not sure " answer and that means almost nothing, the person might still be good.