Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103757
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Marko Rauhamaa <marko@pacujo.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: common mistakes in this simple program |
| Date | Mon, 29 Feb 2016 22:29:54 +0200 |
| Organization | A noiseless patient Spider |
| Lines | 26 |
| Message-ID | <878u23cla5.fsf@elektro.pacujo.net> (permalink) |
| References | <CACT3xuWUk02Or78XHTdkFLsy6CMVHEYKOyid3hFJxw8Wh6-g1A@mail.gmail.com> <CALwzid=3sN3ic=wrq8qn+0P+Zs8xGn1TJRLYL35B1Qk-vDeh5g@mail.gmail.com> <CACT3xuXn1zCip-io9aQ_i0Av_tR-7AHbwq3bX2HbvdmyC_i9qA@mail.gmail.com> <CALwzidn8-HDrGSqZT2ODxhdNYL7yFt5hdmC8RnB4WC=gkD4Wtg@mail.gmail.com> <mailman.35.1456770105.20602.python-list@python.org> <45787234-afd1-4e45-a34d-3bf4bdc241f1@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="24981"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18WKO/WRxCbnz7vW2Motdsz" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
| Cancel-Lock | sha1:JLjh8yyyYFYoEkKW55EpSOjoZSw= sha1:LchClmK87bRT6/bfD850ihepVv0= |
| Xref | csiph.com comp.lang.python:103757 |
Show key headers only | View raw
sohcahtoa82@gmail.com:
> Every time you say "try-expect", my head wants to explode.
>
> It is called a "try-except" block, because you're using the key words
> "try" and "except" when you make one.
Ah, I remember a Python-based test system idea where the "except"
keyword meant "expect":
try: event()
except user.CloseRequest():
...
except user.SendRequest():
...
except peer.DataIndication():
...
except Timeout():
...
etc.
In the end, though, we came up with something better.
Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: common mistakes in this simple program Ganesh Pal <ganesh1pal@gmail.com> - 2016-02-29 23:51 +0530
Re: common mistakes in this simple program sohcahtoa82@gmail.com - 2016-02-29 11:23 -0800
Re: common mistakes in this simple program Marko Rauhamaa <marko@pacujo.net> - 2016-02-29 22:29 +0200
csiph-web