You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Signatures of overloaded methods are incompatible with supertypes, even if they really are #3262
On Apr 26, 2017, at 9:49 AM, Ryan Gonzalez ***@***.***> wrote:
e.g.
from typing import overload
class A:
@overload
def f(self, x: str) -> str: ...
@overload
def f(self, y: int) -> int: ...
class B(A):
@overload
def f(self, x: str) -> str: ...
@overload
def f(self, y: int) -> int: ...
@overload
def f(self, z: bytes) -> bytes: ...
IMO in this case, it should still be compatible, since B supports A's full API, just with another extra function.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
On Apr 26, 2017, at 10:27 AM, Guido van Rossum ***@***.***> wrote:
@sixolet Can you review @kirbyfan64's review?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Activity
sixolet commentedon Apr 26, 2017
refi64 commentedon Apr 26, 2017
@sixolet I think you might be around 10 seconds too late... ;)
Fix python#3262: allow subtypes to define more overloads than their s…
gvanrossum commentedon Apr 26, 2017
@sixolet Can you review @kirbyfan64's review?
sixolet commentedon Apr 26, 2017
Fix python#3262: allow subtypes to define more overloads than their s…
Fix python#3262: allow subtypes to define more overloads than their s…
gvanrossum commentedon May 10, 2017
Did this get fixed or not?
sixolet commentedon May 10, 2017
Allow subtypes to define more overloads than their supertype (#3263)