<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:right;
        direction:rtl;
        unicode-bidi:embed;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang="EN-US" link="blue" vlink="purple">

<div class="Section1">

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Hi,</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">I
tried running the following code and got an exception (Ipy 2.6 final):</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> </p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">import
clr</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">from
System import Int64</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">pickle.dumps(clr.GetPythonType(Int64))</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> </p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><b>throws:</b></p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Traceback
(most recent call last):</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> 
File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> 
File &quot;C:\systems\3rd_party\IronPython\2.6\Lib\pickle.py&quot;, line 1366,
in dumps</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> 
File &quot;C:\systems\3rd_party\IronPython\2.6\Lib\pickle.py&quot;, line 224,
in dump</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> 
File &quot;C:\systems\3rd_party\IronPython\2.6\Lib\pickle.py&quot;, line 286,
in save</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> 
File &quot;C:\systems\3rd_party\IronPython\2.6\Lib\pickle.py&quot;, line 746,
in save_global</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">pickle.PicklingError:
Can&#39;t pickle &lt;type &#39;Int64&#39;&gt;: it&#39;s not found as System in mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.Int64</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"> </p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Is
this a bug?</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Currently
my workaround is to pickle the CS type and convert it to a python type after
unpickling, please tell me if there is a better way.</p>

<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed">Thanks.</p>

</div>

</body>

</html>