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
Remove incorrect statement about data-kwarg interface.
We don't actually require `data` to support `key in data`; we only ever
try `data[key]` (treating any exception as meaning "`key` is not in
`data`, use its value directly"). This can be checked e.g. by creating
a custom type that supports `__getitem__` but throws on `in` checks, and
verify that it can be used as `data`:
```
class T: __getitem__ = lambda self, k: {"foo": 1, "bar": 2}[k]
l, = plt.plot("foo", "bar", data=T())
l.get_xydata() # == [[1, 2]]
"foo" in T() # raises
```
So delete the statement about `s in data`; the statement about `data[s]`
can also be removed as it is clearly implied by the fact that "`s` is
interpreted as `data[s]`".
0 commit comments