adding __getitem__ accessor to Python class method
adding __getitem__ accessor to Python class method Question: I’m attempting to add an item getter (__getitem__, to provide the [] syntax) to a class method so that I can use some unique-ish syntax to provide types to functions outside the normal parentheses, like the following. The syntax on the last line (of this first snippet) …