[Python-ideas] Documenting Python warts
Chris Angelico
rosuav at gmail.com
Wed Jan 2 05:22:40 CET 2013
On Wed, Jan 2, 2013 at 11:55 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> * in Python, bindings ALWAYS occur when the code is executed;
>
> * in Python, "x=<whatever>" is a binding;
>
> * even inside a function definition;
Hey, that's a cool way of looking at it! I never thought of it that
way. So default arguments are simply assigned to right back at
function definition time, even though they're locals. Neat!
ChrisA
More information about the Python-ideas
mailing list