Open jonathanfine opened 9 years ago
Can you please clarify the issue here?
Some may think we have to choose between a vector or flat interface. I'm noting here that we do not. I'm also noting that this capability is build into Python's language API for container[...]
.
In short we have a real opportunity here to be Pythonic, and doing so would provide many benefits.
We can have Python provide both 'flat' and 'vector' interfaces, using a single code-base.
Let
world
denote the Minecraft world we are connected to. Python translatesinto
Now write
Python translates
to exactly the same as before, namely
What's more, Python translates
into
where the slice has
start
andstop
attributespos1
andpos2
. From this we can have__getitem__
do what we think is the right thing.We can even write, if there is need for it