[Python-ideas] PEP 506 (secrets module) and token functions

Andrew Barnert abarnert at yahoo.com
Sat Sep 26 23:00:01 CEST 2015


On Sep 26, 2015, at 06:07, Steven D'Aprano <steve at pearwood.info> wrote:
> 
> Question three:
> 
> - If we have default values, do we need some sort of documented 
>  exception to the general backwards-compatibility requirement?

Why not just use a default value of None, and document that None picks an appropriate value? Then, if it changes to a different appropriate value in 3.7 or 3.6.3 or some custom build of CPython, it hasn't broken backward compatibility.

> 
> E.g. suppose we release the module in 3.6.0 with defaults of 32 bytes, 
> and in 3.6.2 we discover that's too small and we should have used 64 
> bytes. Can we change the default in 3.6.3 without notice?


More information about the Python-ideas mailing list