title: Python 3 rounding behavior in Python 2
body: <p>In Python 2.x, the built-in <a href="http://docs.python.org/2/library/functions.html#round" rel="noreferrer"><code>round</code></a> has the following behavior:</p>
  
  <blockquote>
    <p>if two multiples are equally close, rounding is done <strong>away from 0</strong> (so. for example, round(0.5) is 1.0 and round(-0.5) is -1.0)</p>
  </blockquote>
  
  <p>In Python 3.x, <a href="http://docs.python.org/3/library/functions.html#round" rel="noreferrer">this has changed</a> to the more common:</p>
  
  <blockquote>
    <p>if two multiples are equally close, rounding is done <strong>toward the even choice</strong> (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2).</p>
  </blockquote>
  
  <p>Is there an easy way to get this behavior in Python 2.x? Unfortunately, the <a href="http://docs.python.org/2/library/future_builtins.html" rel="noreferrer"><code>future_builtins</code></a> module doesn't include this. Maybe there's another similar module I haven't found yet? Or, another way to pull Python 3.x functions into Python 2.x?</p>
  
  <p>Obviously, I could write a new function that produces the desired behavior, but I'm more curious if a solution exists that uses the actual Python 3.x function, to avoid adding unnecessary complexity and code to maintain.</p>