Objects

Python has no unboxed or primitive types, no machine values. Instead, everything in Python is an Object! Objects involve an abstract way of thinking about programming. Down to the core, an object is just a struct; an encapsulation of variables and functions into a single entity. But on the surface, objects provide inheritance and other powerful uses.

  • Inheritance simply means an object can be assigned to a variable or passed into a function for example.
  • Unlike C, where an integer (for example) is a machine primitive… a single unstructured chunk of memory… a Python integer will be an object, a large block of structured memory, where different parts of that structure are used internally to the interpreter.

Lab 1A: Python Setup

Now that we learned the background behind Python, lets get to coding. Since Python is cross-platform, you can use whatever OS and text editor/IDE that you'd like. Below are my recommendations:

  • Linux (Fedora, Ubuntu, Arch, etc)
  • OS X
  • Windows (Windows is not my preferred OS for development at all. But Python works just fine on it)
  • Vim (terminal based: steep learning curve)
  • Nano (terminal based)
  • Sublime
  • Visual Studio Code
  • Atom
  • Brackets

Recommend against:

  • Visual Studio
  • Eclipse
  • PyCharm
  • EMacs
  • etc

We flat out do not need a full fledged IDE. Python is easy to understand and type. The faster you memorize it... the faster you'll be dropping scripts.

results matching ""

    No results matching ""