diff --git a/rules/S935/python/rule.adoc b/rules/S935/python/rule.adoc index b84657cca0..8acd2f3a39 100644 --- a/rules/S935/python/rule.adoc +++ b/rules/S935/python/rule.adoc @@ -2,7 +2,7 @@ This rule raises an issue when a special method returns an object of an unexpect == Why is this an issue? -Python allows developers to customize how code is interpreted by defining special methods (also called magic methods). For example, it is possible to define the objects own truthiness or falsiness by iverriding ``++__bool__++`` method. It is invoked when the built-in ``++bool()++`` function is called on an object. The ``++bool()++`` function returns ``++True++`` or ``++False++`` based on the truth value of the object. +Python allows developers to customize how code is interpreted by defining special methods (also called magic methods). For example, it is possible to define an object's own truthiness or falsiness by overriding ``++__bool__++`` method. It is invoked when the built-in ``++bool()++`` function is called on the object. The ``++bool()++`` function returns ``++True++`` or ``++False++`` based on the truth value of the object. The Python interpreter will call these methods when performing the operation they're associated with. Each special method expects a specific return type. Calls to a special method will throw a ``++TypeError++`` if its return type is incorrect.