[Python-checkins] r82184 - in python/branches/py3k: Lib/test/test_datetime.py Modules/datetimemodule.c Python/Python-ast.c

Antoine Pitrou solipsis at pitrou.net
Thu Jun 24 00:09:43 CEST 2010


Hello Alexander,

> -pickle_choices = [(pickle, pickle, proto) for proto in range(3)]
> -assert len(pickle_choices) == 3
> +pickle_choices = [(pickle, pickle, proto) for proto in range(4)]
> +assert len(pickle_choices) == 4

Rather than hardcoding `range(4)`, you should use
`range(pickle.HIGHEST_PROTOCOL + 1)`.

Regards

Antoine.




More information about the Python-checkins mailing list