junckritter / python-github2

github client in python, with issues support.
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Testing this github. #6

Open junckritter opened 14 years ago

junckritter commented 14 years ago

The last except clause may omit the exception name(s), to serve as a wildcard. Use this with extreme caution, since it is easy to mask a real programming error in this way! It can also be used to print an error message and then re-raise the exception (allowing a caller to handle the exception as well):

import sys

try: f = open('myfile.txt') s = f.readline() i = int(s.strip()) except IOError, (errno, strerror): print "I/O error(%s): %s" % (errno, strerror) except ValueError: print "Could not convert data to an integer." except: print "Unexpected error:", sys.exc_info()[0] raise The try ... except statement has an optional else clause, which, when present, must follow all except clauses. It is useful for code that must be executed if the try clause does not raise an exception. For example:

for arg in sys.argv[1:]: try: f = open(arg, 'r') except IOError: print 'cannot open', arg else: print arg, 'has', len(f.readlines()), 'lines' f.close() The use of the else clause is better than adding additional code to the try clause because it avoids accidentally catching an exception that wasn't raised by the code being protected by the try ... except statement.

junckritter commented 14 years ago

Offer some money to support fix of this issue with BidforFix

tgall commented 14 years ago

how does it work? this is alt bff

tgall commented 14 years ago

ahoj

BidforFix commented 14 years ago

Need this feature? Promise money, wait for fix and pay with PayPal.

BidforFix commented 14 years ago

Need this feature? Promise money, wait for fix and pay with PayPal.

junckritter commented 14 years ago

Need this feature? Promise money, wait for fix and pay with PayPal.