Skip to content

Add warnings about "obviously unintended" code #2814

Open
@scoder

Description

@scoder

There is an interesting discussion on the python-dev mailing list about issuing more warnings from the CPython compiler about code that will lead to errors at runtime (if executed). Serhiy Storchaka has written a proof-of-concept patch in the corresponding ticket, that handles several such cases.

Cython already rejects a few more constructs than CPython at compile time, but is otherwise quite relaxed about things that will lead to runtime errors (but that might not get executed and would therefore not necessarily fail the program).

There are many places where a compile time warning could avoid having to write tests and/or require users to run the code in order to detect problems. Cython should issue a warning for them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions