<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi,<div><br></div><div>yes there is a DBNull value. Thanks.</div><div><br></div><div><br><br><hr id="stopSpelling">From: dinov@microsoft.com<br>To: users@lists.ironpython.com<br>Date: Thu, 10 Jun 2010 15:56:50 +0000<br>Subject: Re: [IronPython] deepcopy<br><br>
<style>
.ExternalClass .ecxshape
{;}
</style>
<style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass code
{font-family:'Courier New';}
.ExternalClass pre
{margin-bottom:.0001pt;font-size:10.0pt;font-family:'Courier New';}
.ExternalClass span.ecxHTMLPreformattedChar
{font-family:Consolas;}
.ExternalClass span.ecxEmailStyle21
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;}
.ExternalClass div.ecxSection1
{page:Section1;}
</style>
<div class="ecxSection1">
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:'Calibri','sans-serif';color:#1F497D">Is there a DBNull value somewhere in your object? DBNull is a singleton and I’d guess we’d need to add some custom logic which says the way we deserialize
it is by pulling the singleton from DBNull.Value. You can probably use copy_reg.pickle to register something which will handle objects of type DBNull that just returns DBNull.Value.</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:'Calibri','sans-serif';color:#1F497D"> </span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="ecxMsoNormal"><b><span style="font-size:10.0pt;font-family:'Tahoma','sans-serif'">From:</span></b><span style="font-size:10.0pt;font-family:'Tahoma','sans-serif'"> users-bounces@lists.ironpython.com [mailto:users-bounces@lists.ironpython.com]
<b>On Behalf Of </b>Pablo Dalmazzo<br>
<b>Sent:</b> Thursday, June 10, 2010 7:57 AM<br>
<b>To:</b> IronPython Mailing list<br>
<b>Subject:</b> [IronPython] deepcopy</span></p>
</div>
</div>
<p class="ecxMsoNormal"> </p>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">Hi there,</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">Im getting this error in the copy module. I moved the copy module from the IronPython 2.6 installation to work with</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">IronPython 2.0 for some compatibility problem I had with IronPython 2.6 dll with another dll we use. </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">The only difference I see between the cases which works and those which doesnt are, in the succesful case it is a custom class object "alone", and in the error case is the
deepcopy of a custom class object which contains a list with other instances of that object.</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">Could that have anything to do with the problem? Is that a limitation of the copy module in Python or it should work?</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">error description: </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'"> </span></p>
</div>
<p class="ecxMsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">No se puede encontrar el método 'DBNull..ctor'.<br>
<br>
<b>Error de código fuente:</b> </span></p>
<table class="ecxMsoNormalTable" border="0" cellpadding="0" width="100%" style="width:100.0%;background:#FFFFCC">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<pre>Línea 322: args = deepcopy(args, memo)</pre>
<pre>Línea 323: </pre>
<pre><span style="color:red">Línea 324: y = callable(*args)</span></pre>
<pre>Línea 325:</pre>
<pre>Línea 326: memo[id(x)] = y</pre>
</td>
</tr>
</tbody>
</table>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'"><br>
<b>Archivo de origen: </b>/SistemaVentaBaseIP2/App_Script/copy.py<b> </b>
</span></p>
<div class="ecxMsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">
<hr size="2" width="100%" align="center">
</span></div>
<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif'">Hotmail es más seguro. Con el Filtro Anti Spam tu cuenta está mucho más protegida.
<a href="http://www.descubrehotmail.com/anti-spam.asp ">Ver más</a></span></p>
</div>
</div></div>                                            <br /><hr />Acceder a tu casilla ahora es mucho más rápido. Ahora Hotmail es un 70% más veloz. <a href='http://www.descubrehotmail.com/velocidad.asp ' target='_new'>Conocé más</a></body>
</html>