View | Details | Raw Unified | Return to bug 99009
Collapse All | Expand All

(-)pyyaml/trunk/lib/yaml/constructor.py (revision 168) (-1 / +3 lines)
Lines 232-236 Link Here
232
            return sign*int(value)
232
            return sign*int(value)
233
233
234
    inf_value = 1e300000
234
    inf_value = 1e300
235
    while repr(inf_value) != repr(inf_value*inf_value):
236
        inf_value *= inf_value
235
    nan_value = inf_value/inf_value
237
    nan_value = inf_value/inf_value
236
238
(-)pyyaml/trunk/lib/yaml/representer.py (revision 168) (-3 / +8 lines)
Lines 193-199 Link Here
193
        return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data))
193
        return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data))
194
194
195
    repr_pos_inf = repr(1e300000)
195
    inf_value = 1e300
196
    repr_neg_inf = repr(-1e300000)
196
    while repr(inf_value) != repr(inf_value*inf_value):
197
    repr_nan = repr(1e300000/1e300000)
197
        inf_value *= inf_value
198
    nan_value = inf_value/inf_value
199
200
    repr_pos_inf = repr(inf_value)
201
    repr_neg_inf = repr(-inf_value)
202
    repr_nan = repr(inf_value/inf_value)
198
203
199
    def represent_float(self, data):
204
    def represent_float(self, data):

Return to bug 99009