Re: how to insert random error in a programming

Discussion in 'Python' started by Serhiy Storchaka, Oct 15, 2012.

  1. On 15.10.12 17:04, Chris Angelico wrote:
    > On Tue, Oct 16, 2012 at 12:55 AM, Debashish Saha <> 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))()


    I think OP means something like

    programming[:0] = random.choice((OSError,IOError,ZeroDivisionError,UnicodeDecodeError,AssertionError))()
    Serhiy Storchaka, Oct 15, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. globalrev
    Replies:
    4
    Views:
    753
    Gabriel Genellina
    Apr 20, 2008
  2. VK
    Replies:
    15
    Views:
    1,155
    Dr J R Stockton
    May 2, 2010
  3. Debashish Saha

    how to insert random error in a programming

    Debashish Saha, Oct 15, 2012, in forum: Python
    Replies:
    4
    Views:
    227
    Roy Smith
    Oct 16, 2012
  4. Chris Angelico
    Replies:
    0
    Views:
    152
    Chris Angelico
    Oct 15, 2012
  5. Jean-Michel Pichavant

    Re: how to insert random error in a programming

    Jean-Michel Pichavant, Oct 15, 2012, in forum: Python
    Replies:
    0
    Views:
    155
    Jean-Michel Pichavant
    Oct 15, 2012
Loading...

Share This Page