M
M
MIKHAN_GO2021-09-12 18:45:42
Python
MIKHAN_GO, 2021-09-12 18:45:42

How to specify in this code that the function returns a tuple?

from typing import NoReturn


class Point(object):
    def __init__(self, coordx: int, coordy: int) -> NoReturn:
        self.coordx = coordx
        self.coordy = coordy
    
    def get_x(self) -> int:
        return self.coordx
    
    def get_y(self) -> int:
        return self.coordy
    
    def get_coords(self) -> ****:
        return (self.coordx, self.coordy)


In the code, you need to indicate that the last function of the class returns a tuple. What should be written in place ****?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AWEme, 2021-09-12
@MIKHAN_GO

Tuple[int, int]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question