You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From src/python_minifier/transforms/constant_folding.py, lines 51-54:
ifisinstance(original_value, float) andmath.isnan(original_value):
# There is no nan literal.# we could use float('nan'), but that complicates folding as it's not a Constantreturnnode
NaN values do actually have a representation, at least in all the Python versions that I tested (3.9 through 3.12):
From
src/python_minifier/transforms/constant_folding.py
, lines 51-54:NaN values do actually have a representation, at least in all the Python versions that I tested (3.9 through 3.12):
This is because
inf - inf = nan
and1e309
isinf
.Should be an easy fix, but I don't know if Python 2 supports the same thing so I didn't want to send a PR myself.
The text was updated successfully, but these errors were encountered: