If someone hands you a gun and tells you "Don't shoot yourself in the foot", and you proceed to aim down and pull the trigger, it is not the fault of the person that handed you the gun that you shot yourself in the foot.
Lack of encapsulation is a feature. It allows greater flexibility. But flexibility requires responsibility.
I've never understood the desire for multi-line lambdas. At that point, what makes a lambda different from a function? Just seems like a $1,000 term for a $5 concept.
And decorators are wonderful things. The ability to alter functions in a single line is beautiful.
TypeErrors as described by the author are just sloppy programming. If a function is expecting a string, why are you passing it something that's not a string?