⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 261.html

📁 Python Ebook Python&XML
💻 HTML
字号:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Robots" content="INDEX,NOFOLLOW">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<TITLE>Safari | Python Developer's Handbook -&gt; Standard Exceptions</TITLE>
<LINK REL="stylesheet" HREF="oreillyi/oreillyN.css">
</HEAD>
<BODY bgcolor="white" text="black" link="#990000" vlink="#990000" alink="#990000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellpadding=5 cellspacing=0 border=0 class="navtopbg"><tr><td><font size="1"><p class="navtitle"><a href="8.html" class="navtitle">Web Development</a> &gt; <a href="0672319942.html" class="navtitle">Python Developer's Handbook</a> &gt; <a href="255.html" class="navtitle">A. Python/C API</a> &gt; <span class="nonavtitle">Standard Exceptions</span></p></font></td><td align="right" valign="top" nowrap><font size="1"><a href="main.asp?list" class="safnavoff">See All Titles</a></font></td></tr></table>
<TABLE width=100% bgcolor=white border=0 cellspacing=0 cellpadding=5><TR><TD>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="260.html" title="Exception Handling"><font size="1">&lt;&nbsp;BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=261" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="261.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="262.html" title="Utilities"><font size="1">CONTINUE&nbsp;&gt;</font></a></td></TR></TABLE>
<a href="6%2F1%2F2002+6%3A28%3A56+PM.html" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><font color=white size=1>152015024128143245168232148039196038240039088173205162105045222218072221080086060241090</font><a href="read4.asp?bookname=0672319942&snode=261&now=6%2F1%2F2002+6%3A28%3A56+PM" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><br>
<FONT><h3>Standard Exceptions</h3>
				<p>All standard Python exceptions are available as global variables whose names are <tT CLAss="monofont">PyExc_</tt> followed by the Python exception name. These have the type <TT CLass="monofont">PyObject*</tT>; they are all either class objects or string objects, depending on the use of the <TT Class="monofont">-X</tt> option to the interpreter. For completeness, all the variables are in Table A.1.</p>

				<p><table border="1" cEllSpacIng="0" ceLlpaDDINg="1" widTH="100%">
<CAptioN><H5>Table燗.1. C Variables for the Standard Python Exceptions</H5></CaptiON><COlgroup align="left" span="3">
<tr>
<th vAliGn="top">
<foNt sizE="2">C Name</fonT></TH>
<Th valIGN="top">
<Font sIZE="2">Python Name</Font></tH>
<TH Valign="top">
<font size="2">See Note below</font></th>
</tR>
<tr>
<Td vaLign="top">
<fOnt sIZE="2">PyExc_Exception</Font></tD>
<TD ValigN="top">
<FONt sizE="2">Exception</FONt></td>
<td valign="top">
<font size="2">*</fOnt></Td>
</tr>
<Tr>
<td vAligN="top">
<FONt sizE="2">PyExc_StandardError</FONt></td>
<tD VALign="top">
<fONT Size="2">StandardError</font></td>
<td valign="top">
<fonT siZe="2">*</foNt></td>
</tR>
<tr>
<tD VALign="top">
<fONT Size="2">PyExc_ArithmeticError</fONT></Td>
<td vALIGn="top">
<font size="2">ArithmeticError</font></td>
<td valIgn="top">
<Font Size="2">*</fOnt></tD>
</TR>
<Tr>
<td vALIGn="top">
<fonT SIZe="2">PyExc_LookupError</fonT></TD>
<Td valign="top">
<font size="2">LookupError</font></tD>
<td ValiGn="top">
<fonT sizE="2">*</FONt></td>
</tR>
<TR>
<Td valIGN="top">
<Font sIZE="2">PyExc_AssertionError</Font></td>
<td valign="top">
<font sizE="2">AssertionError</foNt></td>
<Td valIgn="top">
<fONT Size="2">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -