You could do something like
- The class is a normal list
- But it has an extra attribute called
ooronethat shifts the list into 1-indexing mode. So
mylist = ZeroOrOneList(['a', 'b', 'c'])
mylist[0]
# 1
mylist.o[1]
# 1
So [...] gives you zero indexing, .o[...] gives you one indexing. I think such a class could be written and achieve what the OP is asking for, just replacing the OPs syntax of {...} with .o[...].