Category Archives: Python

Names and things (reference semantics) vs. boxes and things (value semantics)

Table of Contents 1. Motivation 2. Alfie Bobbie thought experiment 3. The aa bb experiment (back to Snippet 20) 4. Boxes containing object references 5. Two different meanings of change 6. Pass by value or pass by reference 7. With … Continue reading

Posted in Emacs, Lisp, Python | Tagged , , | 1 Comment

default argument in Python and Lisp

Table of Contents the Python mutable default argument gotcha how to give default arguments in Lisp comparing Lisp and Python the None trick and the nil trick further reading optional reading more on the Python gotcha the gotcha will get … Continue reading

Posted in Emacs, Lisp, Python | Tagged , , | Leave a comment

immutable objects and object identity

Table of Contents 1. Meaning of object in Python, Lisp, JavaScript 1.1. in JavaScript 1.2. in Python 1.3. In Common Lisp 1.4. in Emacs Lisp 1.5. value 1.6. JS objects 2. immutable objects and object identity 2.1. what is object … Continue reading

Posted in JavaScript, Lisp, Python | Tagged | Leave a comment

batch converting raw image files to JPEG using Photoshop and Python

Recently I had to batch convert a bunch of raw image files to JPEG. I had a folder given to me and this folder had a lot of image files, some were in JPEG format, and some other were in … Continue reading

Posted in Python | Tagged , , , | Leave a comment