Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100443 > unrolled thread
| Started by | Vincent Davis <vincent@vincentdavis.net> |
|---|---|
| First post | 2015-12-14 17:20 -0700 |
| Last post | 2015-12-14 17:20 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Try: rather than if : Vincent Davis <vincent@vincentdavis.net> - 2015-12-14 17:20 -0700
| From | Vincent Davis <vincent@vincentdavis.net> |
|---|---|
| Date | 2015-12-14 17:20 -0700 |
| Subject | Re: Try: rather than if : |
| Message-ID | <mailman.9.1450138879.22044.python-list@python.org> |
On Mon, Dec 14, 2015 at 4:53 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>
> Except that catching an exception just to immediately re-raise it is
> silly. This would be better:
>
> try:
> name = handle.name
> except AttributeError:
> pass
> else:
> handle.write("# Report_file: %s\n" % name)
Ya that would be silly.
Thanks everyone for the education.
Back to top | Article view | comp.lang.python
csiph-web