Re: [Tutor] Function Return Values (or References)

2013-06-24 Thread Steven D'Aprano
On 24/06/13 18:12, John Steedman wrote: Hi Tutors, I'm confused by the following possible contradiction. Would someone please explain or point me to the right docs. [snip confusion about parameter passing and Python's object model] By FACT 1 x should be a reference parameter...? By Fact 2 x

Re: [Tutor] Function Return Values (or References)

2013-06-24 Thread John Steedman
Thanks for all these clear and knowledgeable answers. I'm much clearer on this now and will read up a bit more around these subjects. John On Mon, Jun 24, 2013 at 10:59 AM, Peter Otten <__pete...@web.de> wrote: > John Steedman wrote: > > > Hi Tutors, > > > > I'm confused by the following possi

Re: [Tutor] Function Return Values (or References)

2013-06-24 Thread Peter Otten
John Steedman wrote: > Hi Tutors, > > I'm confused by the following possible contradiction. Would someone please > explain or point me to the right docs. > > FACT 1 > > "Variables in python hold references to objects." > http://en.wikipedia.org/wiki/Python_syntax_and_semantics > > FACT 2 > >>

Re: [Tutor] Function Return Values (or References)

2013-06-24 Thread Dave Angel
On 06/24/2013 04:12 AM, John Steedman wrote: Hi Tutors, I'm confused by the following possible contradiction. Would someone please explain or point me to the right docs. FACT 1 "Variables in python hold references to objects." http://en.wikipedia.org/wiki/Python_syntax_and_semantics FACT 2

[Tutor] Function Return Values (or References)

2013-06-24 Thread John Steedman
Hi Tutors, I'm confused by the following possible contradiction. Would someone please explain or point me to the right docs. FACT 1 "Variables in python hold references to objects." http://en.wikipedia.org/wiki/Python_syntax_and_semantics FACT 2 >>>def Increment ( x ) : >>>// return x + 1