Pass-by-reference : Could a C#-like approach work in Python?

Stephen Horne $$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Thu Sep 11 07:27:46 EDT 2003


On Thu, 11 Sep 2003 08:06:22 +0000 (UTC), Thomas Bellman
<bellman at lysator.liu.se> wrote:

>No, you *would* know.  The above call would *not* be able to
>rebind any of thisArgument or thatArgument.

Thanks for the support.

>(For the record, I do not support Stephen's proposal, nor any
>other kinds of call-by-reference in Python.  For one, I don't
>think it meshes well with the rest of Python, and moreover, I
>have yet to encounter a real-world example where this would
>actually make code more readable - and I have been using Python
>for eight years now, and Lisp (which has similar call semantics)
>for a few years before that.)

Yes, I do agree with this now - it was a poorly thought out idea which
reveals nothing so much as the fact that I've got too comfortable with
some other languages ways of working.





More information about the Python-list mailing list