r/programming • • Feb 23 '12

Don't Distract New Programmers with OOP

http://prog21.dadgum.com/93.html
207 Upvotes

288 comments sorted by

View all comments

Show parent comments

2

u/HostisHumaniGeneris Feb 24 '12

That's another nice thing about Python though, you can enter commands directly into the interpreter.

Execute python.exe in a shell. The interpreter appears. Type print("Hello World") and the interpreter will respond back to you.

Earlier today I was dealing with a deserializer that someone else wrote and I had no idea what the output would look like. To test it I just loaded up the interpreter, typed a few imports and data commands, typed output=deserialize(var) and then pprint.pprint(output). Right away it spat out a list of dictionaries.

2

u/tragomaskhalos Feb 24 '12

Agree, a REPL is a massive assist in learning a language (says an old'un who cut his teeth on an antediluvian BASIC where this was implicit).