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
Originally reported by: Zearin (Bitbucket: Zearin, GitHub: Zearin)
There are a few differences in the Exception hierarchies between Python 2 and 3.
(//Aside: Both Pythons allow you to interact with Exceptions without importing anything, but Python 2 also has an importable exceptions module. Dunno why.//)
Could six provide a few mappings to address these differences?
Original comment byZearin (Bitbucket: Zearin, GitHub: Zearin):
…! Wow.
I am embarrassed. I just put the exception hierarchies together side-by-side, and there are in fact very, very few differences. For whatever reason, I thought there were more. Kinda makes me feel silly, as it’s probably not worth opening an enhancement request.
Well, since I foolishly did exactly that—and we’re both reading this—here are the only differences I can spot:
(Py2) StandardError → (Py3) Exception
OSError(EnvironmentError) got 2 new subclasses in Py3: WindowsError and VMSError
Warning got a new subclass in Py3: ResourceWarning
So, yeah. I’m dumb. Only the first of those items is a conversion, and I guess that’s not really a big deal anyway.
Originally reported by: Zearin (Bitbucket: Zearin, GitHub: Zearin)
There are a few differences in the Exception hierarchies between Python 2 and 3.
(//Aside: Both Pythons allow you to interact with Exceptions without importing anything, but Python 2 also has an importable
exceptions
module. Dunno why.//)Could six provide a few mappings to address these differences?
The text was updated successfully, but these errors were encountered: