You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered: