DEV Community

Discussion on: What were some quirks and gotchas about working with Python 1?

Collapse
 
jeikabu profile image
jeikabu

My first programming job involved some stuff written in Python 1.5/1.6. It was quite a while ago, so the details are fuzzy, but this is what I remember:

  • It was easy to make GUIs in Tkinter. Up to that point all I'd used was Java Swing and MFC and Tkinter was almost fun in comparison.
  • Either linters weren't common or we simply didn't know about them and TDD hadn't yet reached critical mass. Lots and lots of runtime errors.
  • Up to that point I'd only used Pascal, C/C++, and Java, and the Python stuff I remember really struggling with: 3 scopes of variables, militant whitespace, dynamic typing, ...
  • A program I took over from a grad student had some kind of insane data structure of multiply nested dicts and lists and had lines and lines of stuff like the_thing = lookup_table[other_dict[whatever[3]["stuff"]][0]][1]["key"][8]
  • I worked on Python bindings to a virtual device driver we made and interfacing with Python from C was painful; manually tracking reference counts, tracking down constant memory leaks, etc.

Probably other things I've forgotten.

Collapse
 
deciduously profile image
Ben Lovy

all I'd used was Java Swing and MFC and Tkinter was almost fun in comparison.

I only have minimal exposure to this area, but this still feels relatively true to me.

militant whitespace

Also this...

interfacing with Python from C was painful

That's interesting, because this is now one of the first things I think of when I think Python. Easy to take for granted now.

Interesting stuff, thanks for sharing!