Document the polyfill design principles#639
Conversation
|
I would also add the mention of constants being polyfilled only when they can produce a meaningful effect. When the constant is meant to enable a new feature in an existing function, it is better to skip polyfilling it as the effect cannot be polyfilled (and the absence of the constant can be used as feature detection). |
|
Good point, added a bullet: a constant whose only role is to toggle behavior in a function we can't polyfill (like |
858b631 to
aa71bd1
Compare
Refs #624.
That issue asks for the polyfill target design to be written down. This adds a "Design principles" section to the README capturing the decisions that are already applied across the codebase:
is_hexargument dropped frommb_decode_numericentity()in 8.0).ValueError-on-invalid-input functions throw on every version whilefalse-returning ones keep returningfalse.$localeargument in 8.5).uuid,deepclone) follow the extension's own history, mirroring the newest native state including deprecations.The wording can of course be adjusted to match your intended policy.