Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109168

Handling exceptions with Py2 and Py3

From Pavlos Parissis <pavlos.parissis@gmail.com>
Newsgroups comp.lang.python
Subject Handling exceptions with Py2 and Py3
Date 2016-05-27 14:24 +0200
Message-ID <mailman.18.1464351883.2277.python-list@python.org> (permalink)
References <57483C86.6030304@gmail.com>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

So, we have ConnectionRefusedError in Python3 but not in Python2.
Six module doesn't provide a wrapper about this.

What is most efficient way to handle this situation in a try-catch block?

Cheers,
Pavlos

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Handling exceptions with Py2 and Py3 Pavlos Parissis <pavlos.parissis@gmail.com> - 2016-05-27 14:24 +0200
  Re: Handling exceptions with Py2 and Py3 Steven D'Aprano <steve@pearwood.info> - 2016-05-27 22:51 +1000
    Re: Handling exceptions with Py2 and Py3 Pavlos Parissis <pavlos.parissis@gmail.com> - 2016-05-27 15:42 +0200

csiph-web