Source

pypy / pypy / objspace / std / floattype.py

Diff from to

pypy/objspace/std/floattype.py

 NDIGITS_MAX = int((rfloat.DBL_MANT_DIG - rfloat.DBL_MIN_EXP) * 0.30103)
 NDIGITS_MIN = -int((rfloat.DBL_MAX_EXP + 1) * 0.30103)
 
-@unwrap_spec(w_ndigits=WrappedDefault(None))
 def descr___round__(space, w_float, w_ndigits=None):
     # Algorithm copied directly from CPython
     from pypy.objspace.std.floatobject import W_FloatObject
     assert isinstance(w_float, W_FloatObject)
     x = w_float.floatval
 
-    if space.is_none(w_ndigits):
+    if w_ndigits is None:
         # single-argument round: round to nearest integer
         rounded = rfloat.round_away(x)
         if math.fabs(x - rounded) == 0.5:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.