As far as I am aware, the latter is just a nicer way of doing the former.
It's actually not that unusual in Python, consider repr(x)
, which just calls x.__repr__()
or len(x)
, which just calls x.__len__()
. Python prefers to use built-ins for common functions that you are likely to use over a range of classes, and generally implements these by calling __x__()
methods.