New submission from Chaim Gewirtz <[email protected]>:
Why should @overload need to be followed by an implementation when an
implementation already exists in the parent class?
Illustrative example:
class Parent:
def foo(**kwargs):
"""Argument names of foo vary depending on the child class."""
class Child(Parent):
@overload foo(a, b): ...
Raises:
"NotImplementedError: You should not call an overloaded function. A series of
@overload-decorated functions outside a stub module should always be followed
by an implementation that is not @overload-ed."
----------
messages: 384255
nosy: chaim422
priority: normal
severity: normal
status: open
title: @overload-ing method of parent class without actual implementation
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42812>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com