Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tuples of ast.ExceptHandler names #100

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

jparise
Copy link
Member

@jparise jparise commented Jan 29, 2019

In Python 2, it's legal to receive and unpack a tuple as an exception
value:

except (socket.herror, socket.gaierror) as (errno, errstring):

This is in fact the documented exception value of some socket functions:

Fixes #98

@jparise jparise force-pushed the excepthandler-tuple branch from 8fa5b18 to b1c8d44 Compare January 29, 2019 15:53
src/pep8ext_naming.py Show resolved Hide resolved
In Python 2, it's legal to receive and unpack a tuple as an exception
value:

    except (socket.herror, socket.gaierror) as (errno, errstring):

This is in fact the documented exception value of some socket functions:

 - https://docs.python.org/2/library/socket.html#socket.herror
 - https://docs.python.org/2/library/socket.html#socket.gaierror

Fixes PyCQA#98
@jparise jparise force-pushed the excepthandler-tuple branch from b1c8d44 to 76d14bb Compare January 29, 2019 19:05
@jparise jparise merged commit 9596c43 into PyCQA:master Jan 29, 2019
@jparise jparise deleted the excepthandler-tuple branch January 29, 2019 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants