Python Type 'Instance' Convert
<p>I am using a builtin SNMP library to get some data off a server. Now when I get it back it shows up in a list as</p>

<p><code>
.&gt;&gt;&gt; [ObjectName(1.2.6.1.4.1.111.1.4.1.7), Integer(21)]
</code></p>

<p>When I print out <code>x[0]</code> (pretend x is that response^) I see 1.2.6.1.4.1.111.1.4.1.7 and 21 for <code>x[1]</code> but when I do <code>type(x[0])</code> I get <code>&lt;type 'instance'&gt;</code>.</p>

<p>Now my question is that is there a way to find the type of <code>x[1]</code> and convert it to that? (<code>x[0]</code> will always be a string but <code>x[1]</code> can be integer, string or float etc.</p>

<p>Is there a way to read that "Integer" (in this case)?</p>

<p>Thanks</p>

<p>Edit:</p>

<p>I dont think I described it clearly. I really done care about <code>x[0]</code> at all, I want to convert the <code>x[1]</code> to what it is without modifying anything from the class that I am getting the SNMP data from. In this example its an <code>int</code> but it can be a float or a string. I am looking for a way to determine what the type of that instance is and then convert it to that</p>
