RE: I Need A Placeholder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Deverter,Mark

    RE: I Need A Placeholder

    I typically use pass for a place holder.

    try:
    # Do some code here
    var = 1 # For example
    except:
    pass

    HTH,
    Mark

    -----Original Message-----
    From: python-list-bounces+mark.de verter=dads.sta te.tx.us@python .org
    [mailto:python-list-bounces+mark.de verter=dads.sta te.tx.us@python .org] On
    Behalf Of Ampedesign
    Sent: Thursday, June 26, 2008 12:04 PM
    To: python-list@python.org
    Subject: I Need A Placeholder

    I'm trying to build a try/except case, and I want to have the except
    function like such:

    try:
    # Do some code here
    var = 1 # For example
    except:
    #Do nothing here

    The only problem is if I leave a comment only in the except block, I
    get an error back saying that the except block is not properly
    formatted, since it has no content other than a comment.

    So if anyone could suggest some code to put there as a placeholder
    that would be wonderful.
    --

Working...