A Few Python Tricks

(Edit: This is a fairly old library. If you are interested in @once, frozendict, and Opt, these are included as part of the newer value objects library.)

A while ago I gave a talk to the LA Python user group about a few Python tricks we use at my company Lingospot. Three years later we’re still using all of these techniques. There isn’t any particular theme, it’s just a mix of tricks that are simple and widely applicable. You can find the slides and sample code here.

If I recall, the talk was generally well received. Interestingly some audience members didn’t find Option Types to be “Pythonic”, which very well may be true. Nowadays I prefer to use Java for reasons I describe in Why & How I Write Java.  For Option Types in Java I use Google Guava’s Optional. I certainly don’t miss the errors caused by null/None.

Advertisements

One thought on “A Few Python Tricks

Comments are closed.