[issue30513] getrusage returns platform-dependent value

2017-05-30 Thread sam-s
New submission from sam-s: `resource.getrusage(resource.RUSAGE_SELF).ru_maxrss` returns the peak memory usage, in *bytes* on BSD (including Mac OS X) and in *kilobytes* on Linux. This means that to get a cross-platform value, the user has to check `sys.platform`, which is fairly inconvenient

[issue30513] getrusage returns platform-dependent value

2017-05-30 Thread sam-s
sam-s added the comment: Experiment shows that the Linux multiplier is 1024 (not 1000). -- ___ Python tracker <http://bugs.python.org/issue30513> ___ ___ Pytho

[issue30515] unittest: assertAlmostEqual rounding error

2017-05-30 Thread sam-s
New submission from sam-s: I get this `unittest` failure: ``` Traceback (most recent call last): File "zzz.py", line 348, in test_opposite self.assertAlmostEqual(a, b, places=2) AssertionError: 1.1036640046288428 != 1.0986122886681098 within 2 places ``` This seems

[issue30515] unittest: assertAlmostEqual rounding error

2017-05-30 Thread sam-s
sam-s added the comment: you are right, sorry. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or