[Python-ideas] Documenting Python warts (original) (raw)
Chris Angelico rosuav at gmail.com
Wed Jan 2 05:22:40 CET 2013
- Previous message: [Python-ideas] Documenting Python warts
- Next message: [Python-ideas] Documenting Python warts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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=" 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
- Previous message: [Python-ideas] Documenting Python warts
- Next message: [Python-ideas] Documenting Python warts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]