Skip to content

Instantly share code, notes, and snippets.

View dmitriyKolmogorov's full-sized avatar
🔥

myDiamondsDancing dmitriyKolmogorov

🔥
View GitHub Profile
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.')