python courses: lecture 1
TRANSCRIPT
“Over six years ago, in December 1989, I was looking for a "hobby" programming project that would keep me occupied during the week around Christmas. My office ... would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language I had been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers. I chose Python as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty Python's Flying Circus).”
Data typesBasic types
Container types
Numbers
int float complex decimal
Strings
str raw bytes chr
bytearray
SequencesList Tuple Set Dict
Bool NoneType
named tuple
frozen set
ordered dict
Main types
Class
Instance
Function
Type
deque
L.E.G.B rule
L, Local — Names assigned in any way within a function (def or lambda)), and not declared global in that function.E, Enclosing-function locals — Name in the local scope of any and all statically enclosing functions (def or lambda), from inner to outer.G, Global (module) — Names assigned at the top-level of a module file, or by executing a globalstatement in a def within the file.B, Built-in (Python) — Names preassigned in the built-in names module : open,range,SyntaxError,...