[New-bugs-announce] [issue46174] Feature Request for Python Interfaces

Or report at bugs.python.org
Fri Dec 24 11:17:33 EST 2021


New submission from Or <orieeeams at gmail.com>:

Most object oriented languages provide interfaces as part of the core language, this helps bring better design principles to a team's workflows.

Today Python provides the ABC module for abstract base classes and the Protocol class from typing module as something that might resemble an interface.

Creating abstract classes to simulate interface behavior is pretty tedious and the Protocol class is not supported by IDEs for type hints, completions, bug findings, etc.

I think the Python community would really benefit if we have an interface keyword built into the core language and enforced by the interpreter, similar to how it's implemented in Java and C#.

----------
messages: 409149
nosy: Orie
priority: normal
severity: normal
status: open
title: Feature Request for Python Interfaces
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46174>
_______________________________________


More information about the New-bugs-announce mailing list