Scoping in Python 'for' loops

前端 未结 6 1190
名媛妹妹
名媛妹妹 2020-11-22 03:52

I\'m not asking about Python\'s scoping rules; I understand generally how scoping works in Python for loops. My question is why the design decisions were m

6条回答
  •  名媛妹妹
    2020-11-22 04:17

    One of the primary influences for Python is ABC, a language developed in the Netherlands for teaching programming concepts to beginners. Python's creator, Guido van Rossum, worked on ABC for several years in the 1980s. I know almost nothing about ABC, but as it is intended for beginners, I suppose it must have a limited number of scopes, much like early BASICs.

提交回复
热议问题