Examples and exercises in designing, building, and testing classes.
The built-in numeric types in Python can be combined in the usual ways using operators such as + and -. This facility can be added to your own classes through what is called operator overloading. This can be applied to any type you create, not just those that represent numbers, but do take care not to confuse your users.
Reminder. Python strings make use of operator overloading.
print ("Hello " + "world")
print ("_" * 11)
Hello world
___________
In DDD we identify entities, values, and services.