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
This issue just came up with IPython 2.0-dev (appears to not be an issue for IPython 1.0) where our DictWrapper object raised KeyError on bad __getattr__ (which screws up hasattr). It's a badly behaved object, but it's been around for a while. We're going to fix this in 0.13, which we're releasing soonish, but this probably affects a number of versions. pandas-dev/pandas#5182
I'm not clear why defining a __dir__ method isn't enough, but a simple fix would be to go the EAFP route and just try to do it in try/except rather than doing the hasattr check. I'm sure there are other places where this could be an issue
cc @d10genes who pointed out the problematic interaction with IPython 2.0-dev.
The text was updated successfully, but these errors were encountered:
For clarity - I bring this up because I wanted to point out that objects misbehave and it's probably surprising to users; however, but it's not unreasonable to think that most things should work right with hasattr ;p
This issue just came up with IPython 2.0-dev (appears to not be an issue for IPython 1.0) where our DictWrapper object raised KeyError on bad
__getattr__
(which screws uphasattr
). It's a badly behaved object, but it's been around for a while. We're going to fix this in 0.13, which we're releasing soonish, but this probably affects a number of versions. pandas-dev/pandas#5182I'm not clear why defining a
__dir__
method isn't enough, but a simple fix would be to go the EAFP route and just try to do it in try/except rather than doing thehasattr
check. I'm sure there are other places where this could be an issuecc @d10genes who pointed out the problematic interaction with IPython 2.0-dev.
The text was updated successfully, but these errors were encountered: