8000 Testing this github. · Issue #6 · junckritter/python-github2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Testing this github. #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
junckritter opened this issue Jun 29, 2010 · 6 comments
Open

Testing this github. #6

junckritter opened this issue Jun 29, 2010 · 6 comments

Comments

@junckritter
Copy link
Owner

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
Copy link
Owner Author

Offer some money to support fix of this issue with BidforFix

@tgall
Copy link
tgall commented Jul 14, 2010

how does it work?
this is alt bff

@tgall
Copy link
tgall commented Jul 14, 2010

ahoj

@BidforFix
Copy link

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

1 similar comment
@BidforFix
Copy link

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

@junckritter
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0