gavinj.net

Thoughts on technology, infrastructure, and AI

Viewing posts tagged python Clear filter

Python decorators

I came across an interesting recent addition to the Python language (as of Python 2.4). They are called decorators. Decorators are Python objects that can register, annotate, and/or wrap a Python fun...

Python file magic

File magic is used on Linux and Unix systems as a binary "fingerprint" to tell what type a file actually is - this provides a much better result than MIME or filename extensions. The "magic" pattern i...