<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Naufraghi nella rete (Posts about python)</title><link>https://naufraghi.slug.it/</link><description></description><atom:link href="https://naufraghi.slug.it/categories/python.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2023 &lt;a href="mailto:matteo@naufraghi.net"&gt;Matteo Bertini&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Fri, 05 May 2023 13:54:10 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Somewhat safer unpickler</title><link>https://naufraghi.slug.it/posts/2018/06/somewhat-safer-unpicker/</link><dc:creator>Matteo Bertini</dc:creator><description>&lt;p&gt;This class inherits all the implementation from the builtin &lt;code&gt;pickle.Unpickler&lt;/code&gt; but modifies the &lt;code&gt;self.dispatch&lt;/code&gt; dictionary used to unpack the serialized structures.&lt;/p&gt;
&lt;p&gt;This is not checked to be safe, but in case you are using pickled files in production and you are searching for some safer way to load them to convert the data to a different format, this class can be handy.&lt;/p&gt;
&lt;p&gt;The same idea works for Python 3, subclassing &lt;code&gt;pickle._Unpickler&lt;/code&gt;.&lt;/p&gt;
&lt;script src="https://gist.github.com/naufraghi/5cabdcb36f20da621956d8412afd1767.js"&gt;&lt;/script&gt;</description><category>python</category><category>python2</category><category>serialization</category><guid>https://naufraghi.slug.it/posts/2018/06/somewhat-safer-unpicker/</guid><pubDate>Fri, 22 Jun 2018 10:58:45 GMT</pubDate></item></channel></rss>