Write class such that calling instance returns all instance variables
问题 I have answered my own question - see answer below I'm writing a class, and I want this behavior: a = f(10,20) some_funct(a.row) # some_function is given 10 some_funct(a.col) # some_function is given 20 some_funct(a) # some_function is given a tuple of 10, 20 <-- THIS ONE :) The last behavior is stumping me. I have not seen any examples that cover this. Thus far: class f(object): """Simple 2d object""" row: int col: int def __init__(self, row, col): self.row = row self.col = col Explictly I