The dunder methods in Python

12 21,723 3,567
articles words lines of code

The dunder method __new__ is used to customise object creation and is a core stepping stone in understanding metaprogramming in Python.

This article shows how you can create a case-insensitive string class using some basic meta programming with the dunder method __new__.