Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31306
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'url:faqs': 0.09; 'subject:error': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; 'skip:r 80': 0.16; 'subject:programming': 0.16; 'subject:random': 0.16; 'url:catb': 0.16; 'url:~esr': 0.16; 'wrote:': 0.17; 'received:209.85.214.174': 0.21; 'insert': 0.23; 'raise': 0.24; 'random': 0.24; 'header:In- Reply-To:1': 0.25; 'am,': 0.27; 'question': 0.27; 'message- id:@mail.gmail.com': 0.27; 'error': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'but': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xQcAvM395veM/gzFakaGicET39lzo+aDaPf5OKi4Q34=; b=mvGe92317oDEdkWfI3LJ7ecaTl9oXC0KEpkW7MP3raW+JuGS/Jbps5jyvZOngEiUel zYBK2Mdj+fTeezP39OatEdHd9kTDqeYCxc/eyvEkaQlN9ORTk0lLHVo5VoKp5eNPXNYu i86RsATAO1DPXPiJnDCeOENyKPyBHl2Uuzkn6AoRxBuuwjlmHhD0J0rmuv2CjNqdOwY/ d7kw/VftBLDiLMY0XIkaHMFrGCjh1xBwWZwvkX7XO9CMXoAtkT05hPe96M0J29fUME6/ CaOUirMdDik9e2CVjSmljT10oHVwUT14/jYLI3c+bNl9z+zhpgqdlPzUwmP6cRzjDNrb XNzw== |
| MIME-Version | 1.0 |
| In-Reply-To | <CA+b=61AiVYehyGbFyvyTqsfZeio1NoWKtw1SwJV_r_MZ1BcVwA@mail.gmail.com> |
| References | <CA+b=61AiVYehyGbFyvyTqsfZeio1NoWKtw1SwJV_r_MZ1BcVwA@mail.gmail.com> |
| Date | Tue, 16 Oct 2012 01:04:49 +1100 |
| Subject | Re: how to insert random error in a programming |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2208.1350309891.27098.python-list@python.org> (permalink) |
| Lines | 11 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1350309891 news.xs4all.nl 6951 [2001:888:2000:d::a6]:33462 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:31306 |
Show key headers only | View raw
On Tue, Oct 16, 2012 at 12:55 AM, Debashish Saha <silideba@gmail.com> wrote: > how to insert random error in a programming? how to ask question good in forumming? http://www.catb.org/~esr/faqs/smart-questions.html But here's one way to do it: raise random.choice((OSError,IOError,ZeroDivisionError,UnicodeDecodeError,AssertionError))() ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: how to insert random error in a programming Chris Angelico <rosuav@gmail.com> - 2012-10-16 01:04 +1100
csiph-web