rfc:strict_operators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
rfc:strict_operators [2020/07/06 15:12]
jasny
rfc:strict_operators [2020/07/06 15:14]
jasny
Line 32: Line 32:
 The one exception is that [[http://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.1.2|widening primitive conversion]] is allowed for ''%%int%%'' to ''%%float%%''. When doing a operation with an ''%%int%%'' and a ''%%float%%'', the ''%%int%%'' will silently casted to a ''%%float%%''. The one exception is that [[http://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.1.2|widening primitive conversion]] is allowed for ''%%int%%'' to ''%%float%%''. When doing a operation with an ''%%int%%'' and a ''%%float%%'', the ''%%int%%'' will silently casted to a ''%%float%%''.
  
-Using ''strict_operators'' does not affect the behavior of an operator besides throwing a ''TypeError'' for unsupported types.+Using ''strict_operators'' never changes the outcome of an operation.
  
 ===== Details for operands ===== ===== Details for operands =====
rfc/strict_operators.txt · Last modified: 2020/07/15 14:27 by jasny