I typically use pass for a place holder.

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

HTH,
Mark

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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.
--
http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to