Content-Length: 289954 | pFad | https://github.com/python/cpython/issues/148663

ad `calendar.IllegalMonthError` docs omit IndexError base class · Issue #148663 · python/cpython · GitHub
Skip to content

calendar.IllegalMonthError docs omit IndexError base class #148663

Description

@EoinTrial

The documentation for calendar.IllegalMonthError describes it only as "a subclass of ValueError", but the source code defines it as class IllegalMonthError(ValueError, IndexError):.

The IndexError base class is intentional for backwards compatibility (see the source comment in Lib/calendar.py), but this is not mentioned in the docs. Users catching IndexError for bad month numbers won't know their code still works after 3.13.

Linked PRs

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









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/148663

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy