Message 87751 - Python tracker (original) (raw)

I understand this is indeed unintuitive. The reason list objects support the C "mapping protocol" in 3.x is that it is how slicing of lists (and tuples, for that matter) is implemented. Perhaps the documentation should carry a warning about this.

Unfortunately, right now there is no easy way in C to check that an object implements a given ABC.