Skip to content

Missleading example of value validation for dbm since 3.13 #131323

Open
@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    • Status

      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions