This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections.abc import Iterable | |
class Vector(object): | |
def __init__(self, *args): | |
if isinstance(args[0], int) or isinstance(args[0], float): | |
self.__values = tuple(args) | |
else: | |
if len(args) != 1: | |
raise ValueError('Expected 1 argument which is not of type float or int.') |