擅长:python、mysql、java
<pre><code>except ShortInputException, x:
</code></pre>
<p>捕获类ShortInputException的异常,并将异常对象的实例绑定到x</p>
<p>更常见的语法是</p>
^{pr2}$
<p>如<a href="http://www.python.org/dev/peps/pep-3110/">PEP3110</a>所述,这是首选。除非需要支持python2.5,否则应该使用as版本。在</p>
<hr/>
<pre><code>Exception.__init__(self)
</code></pre>
<p>调用超级类的构造函数,该类是此用户定义类派生的类。在</p>