Skip to content

Missleading example of value validation for dbm since 3.13 #131323

@koutoftimer

Description

@koutoftimer

Documentation

cpython/Doc/library/dbm.rst

Lines 132 to 134 in 9558d22

# Storing a non-string key or value will raise an exception (most
# likely a TypeError).
db['www.yahoo.com'] = 4

Is not correct since sqlite is default backend. int will be silently stored and those who rely on dbm to validate the value are in trouble.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesdocsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions