Pass-by-reference : Could a C#-like approach work in Python?
JCM
joshway_without_spam at myway.com
Wed Sep 10 15:05:20 EDT 2003
Stephen Horne <$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$.co.uk> wrote:
> 1. I pointed out that this is an advantage of the C# system, which I
> was proposing to imitate.
>
> : The C# solution uses a modifier keyword, but that keyword must be
> : specified in both the function definition *and* the call. For
> : instance...
>
> ...
>
> : The rationale for this in C#, I assume, is mostly about clarity and
> : maintainability - the caller can't be surprised when value type
> : parameters are changed in a function as he had to explicitly allow it.
>
>
> 2. You quoted the example I labelled as "(roughly) what I'd like to
> be able to do" and ignored the one where I adopted the C#
> approach...
I enitirely missed the second half of your original post. Oops.
More information about the Python-list
mailing list