Lines Matching refs:coercion
2165 coercion rules would become too complicated).
2252 ask the other object to attempt a coercion (but sometimes, if the implementation
2263 This section used to document the rules for coercion. As the language has
2264 evolved, the coercion rules have become hard to document precisely; documenting
2266 here are some informal guidelines regarding coercion. In Python 3, coercion
2271 If the left operand of a % operator is a string or Unicode object, no coercion
2276 It is no longer recommended to define a coercion operation. Mixed-mode
2277 operations on types that don't define coercion pass the original arguments to
2322 When either operand type defines a coercion, this coercion is called before that
2324 the coercion returns an object of a different type for the operand whose
2325 coercion is invoked, part of the process is redone using the new object.
2330 implements :meth:`__iop__`, it is invoked without any coercion. When the
2332 coercion rules apply.
2348 coercion. Three-way comparison (implemented by :meth:`__cmp__`) does use
2349 coercion under the same conditions as other binary operations use it.
2354 :class:`long`, :class:`float`, and :class:`complex` do not use coercion.