Please see: <a href="http://docs.python.org/library/__builtin__.html?highlight=__builtins__">http://docs.python.org/library/__builtin__.html?highlight=__builtins__</a><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<strong style="font-family:sans-serif;font-size:16px;line-height:20px;text-align:justify;background-color:rgb(255,255,255)">CPython implementation detail:</strong><span style="font-family:sans-serif;font-size:16px;line-height:20px;text-align:justify;background-color:rgb(255,255,255)"> Most modules have the name </span><tt class="docutils literal" style="background-color:rgb(236,240,243);padding:0px 1px;font-size:0.95em;line-height:20px;text-align:justify"><span class="pre"><span class="highlighted">__builtins__</span></span></tt><span style="font-family:sans-serif;font-size:16px;line-height:20px;text-align:justify;background-color:rgb(255,255,255)"> (note the </span><tt class="docutils literal" style="background-color:rgb(236,240,243);padding:0px 1px;font-size:0.95em;line-height:20px;text-align:justify"><span class="pre">&#39;s&#39;</span></tt><span style="font-family:sans-serif;font-size:16px;line-height:20px;text-align:justify;background-color:rgb(255,255,255)">) made available as part of their globals. The value of</span><tt class="docutils literal" style="background-color:rgb(236,240,243);padding:0px 1px;font-size:0.95em;line-height:20px;text-align:justify"><span class="pre"><span class="highlighted">__builtins__</span></span></tt><span style="font-family:sans-serif;font-size:16px;line-height:20px;text-align:justify;background-color:rgb(255,255,255)"> is normally either this module or the value of this modules’s </span><tt class="xref py py-attr docutils literal" style="background-color:rgb(255,255,255);padding:0px 1px;font-size:0.95em;font-weight:bold;line-height:20px;text-align:justify"><span class="pre">__dict__</span></tt><span style="font-family:sans-serif;font-size:16px;line-height:20px;text-align:justify;background-color:rgb(255,255,255)"> attribute. Since this is an implementation detail, it may not be used by alternate implementations of Python.</span></blockquote>
<br><div class="gmail_quote">On Tue, Oct 16, 2012 at 12:22 PM, PJ Eby <span dir="ltr">&lt;<a href="mailto:pje@telecommunity.com" target="_blank">pje@telecommunity.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Oct 16, 2012 at 11:18 AM, Alain Poirier<br>
&lt;<a href="mailto:alain.poirier@net-ng.com">alain.poirier@net-ng.com</a>&gt; wrote:<br>
&gt;   File &quot;/private/tmp/PEAK-Rules-0.5a1.dev-r2707/peak/rules/predicates.py&quot;, line 595, in _parse_string<br>
&gt;     b = CriteriaBuilder(engine.arguments, ctx.localdict, ctx.globaldict, __builtins__)<br>
&gt;   File &quot;/private/tmp/PEAK-Rules-0.5a1.dev-r2707/peak/rules/codegen.py&quot;, line 334, in __init__<br>
&gt;     dict([(k,self.Const(v)) for k,v in ns.iteritems()]) for ns in namespaces<br>
&gt; AttributeError: &#39;module&#39; object has no attribute &#39;iteritems&#39;<br>
&gt;<br>
&gt;<br>
&gt; Do you think it could be possible to have a working PyPy version of Peak Rules?<br>
<br>
</div>It depends. It looks like the problem above is that __builtins__ in<br>
PyPy might be a module instead of a dictionary?  If so, that&#39;s<br>
probably a bug in PyPy that needs to be fixed.<br>
<br>
There are likely to be other problems besides this one, but let&#39;s take<br>
them one at a time.  ;-)<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
PEAK mailing list<br>
<a href="mailto:PEAK@eby-sarna.com">PEAK@eby-sarna.com</a><br>
<a href="http://www.eby-sarna.com/mailman/listinfo/peak" target="_blank">http://www.eby-sarna.com/mailman/listinfo/peak</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Marcin Tustin<br>Tel: +44 (0) 7773 787 105 (UK)<br><div>       +1  917 553 3974 (US)</div><div><br></div><br>
</div>