Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 293526 Details for
Bug 430991
Miss handling of errors by error handler in python
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Show how to catch a TypeError within a function
abcd.py (text/plain), 329 bytes, created by
James Antill
on 2008-01-31 00:40:05 UTC
(
hide
)
Description:
Show how to catch a TypeError within a function
Filename:
MIME Type:
Creator:
James Antill
Created:
2008-01-31 00:40:05 UTC
Size:
329 bytes
patch
obsolete
> >def te(func): > """ Catch TypeError() in functions. """ > def nfunc(*args, **kwargs): > try: > return func(*args, **kwargs) > except TypeError: > return None > > nfunc.__name__ = func.__name__ > nfunc.__doc__ = func.__doc__ > nfunc.__dict__.update(func.__dict__) > return nfunc > >@te >def tst(a, b): > return a+b > >c = tst(1,) >print c >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 430991
: 293526