Month: October 2017

Python Immutability for Collection-Typed Attributes

I came across a situation recently where I wanted to preserve the immutability of lists of data that were being returned from a Python class. I held an implicit assumption that nothing in the code would change the content of the lists. But nothing enforced this assumption in the code, and the logic in the

Python: Old versus New Class Declaration

As a followup to my post on Checking Python Code with Pylint, here’s a look at what the effect is of using “new style” vs “old style” declaration when defining classes in Python. The ‘pylint’ checking tool for python complains that the “old style” class declaration is a “coding violation”. The sample code here declares

Checking Python Code with Pylint

These are a collection of notes from learning to use pylint to check the quality of Python code. I’ve been experimenting with Python recently; it’s become widely popular for data science applications (especially deep learning), and it’s also handy for the utility scripts that I often write (like trolling through logs, looking for interesting events

The Curiousity of Leonardo Da Vinci

In a recent article in the Wall Street Journal, Walter Isaacson, biographer of Steve Jobs, Benjamin Franklin, and Albert Einstein, presents some ideas from his soon to be published book about Leonardo Da Vinci. He discusses the qualities that made Da Vinci the accomplished renaissance man that he was. The key points: indulge fantasy, observe