Skip to content Skip to sidebar Skip to footer
Showing posts with the label Magic Methods

How To Overload Python's __bool__ Method?

Possible Duplicate: defining “boolness” of a class in python I thought this should print 'Fal… Read more How To Overload Python's __bool__ Method?

Defining Magic Methods On Classes

I would like to define a single object that can be iterated over without having to create a class a… Read more Defining Magic Methods On Classes

Reflected Greater Than Magic Methods

I am in need of a reflected magic method 'greater than' and there does not appear to be one… Read more Reflected Greater Than Magic Methods