Try Except in python :syntax issue
<pre><code>class ShortInputException(Exception):
'''A user-defined exception class.'''
          def __init__(self, length, atleast):
                Exception.__init__(self)
                self.length = length
                self.atleast = atleast
try:
          s = raw_input('Enter something --&gt; ')
          if len(s) &lt; 3:
                raise ShortInputException(len(s), 3)


except ShortInputException, x:
           print 'ShortInputException: The input was of length %d, \
           was expecting at least %d' % (x.length, x.atleast)
</code></pre>

<p>I dont understand the syntax of this line: <code>except ShortInputException, x:</code></p>

<p>what is x here for ??
and why is it acting as an object ???</p>

<p>waht does this line do ? :  <code>Exception.__init__(self)</code></p>

<p>Thanks</p>
