Stephen Hansen wrote:
I have a feeling this might start one of those uber-massive "pass by
value / reference / name / object / AIEE" threads where everyone goes
around in massive circles explaining how Python uses one or another
parameter passing paradigm and why everyone else is wrong... but..
>
>
> * This writeup, and the virtually identical one at effbot.org that Diez
> referenced, address the *what* of default arguments, but don't really
> address the *why*, beyond the statement that "Default values are created
> exactly once, when the function is defined (by executing the *def* <
> h
Duncan Booth wrote:
Tim Chase wrote:
There _are_ cases where it's a useful behavior, but they're rare,
so I don't advocate getting rid of it. But it is enough of a
beginner gotcha that it really should be in the Python FAQ at
www.python.org/doc/faq/general/
That's an excellent idea!
So
Duncan Booth wrote:
Tim Chase wrote:
There _are_ cases where it's a useful behavior, but they're rare,
so I don't advocate getting rid of it. But it is enough of a
beginner gotcha that it really should be in the Python FAQ at
www.python.org/doc/faq/general/
That's an excellent idea!
So
Tim Chase wrote:
> There _are_ cases where it's a useful behavior, but they're rare,
> so I don't advocate getting rid of it. But it is enough of a
> beginner gotcha that it really should be in the Python FAQ at
> www.python.org/doc/faq/general/
>
That's an excellent idea!
So excellent in
Train Bwister wrote:
Please explain: http://python.pastebin.com/m401cf94d
IMHO this behaviour is anything but the usual straight forward and
obvious way of Python.
Can you please point out the benefits of this behaviour?
http://docs.python.org/tutorial/controlflow.html#more-on-defining-functi
Train Bwister wrote:
> Please explain: http://python.pastebin.com/m401cf94d
>
> IMHO this behaviour is anything but the usual straight forward and
> obvious way of Python.
>
> Can you please point out the benefits of this behaviour?
http://effbot.org/pyfaq/why-are-default-values-shared-between-
Please explain: http://python.pastebin.com/m401cf94d
IMHO this behaviour is anything but the usual straight forward and
obvious way of Python.
Can you please point out the benefits of this behaviour?
All the best,
TrainBwister
--
http://mail.python.org/mailman/listinfo/python-list