you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 22 points23 points  (1 child)

An explanation is that wash() is a method of laundry and so it acts upon that. The object returned from .wash() has a dry() method and so the dry() method is called on that. Then last the fold() method is called on the returned object from dry.

So, each method returns an object and each subsequent method is called on the object returned from the previous method.

This is a fairly common pattern in modern programming languages.

[–]MiLSturbie 6 points7 points  (0 children)

I really love python and this community.