<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="word-wrap:break-word">
<div>Hi guys</div>
<div><br>
</div>
<div> Generally, pony has been great. Thanks!</div>
<div><br>
</div>
<div>However I think this is a bug. I ran the attached program, and it generates this call stack. The error is reported in line 202 but it is actually in line 203. I know that the ID in 203 overrides the db.entity class of that name, but I would think that
the error does not exist until line 203.</div>
<div><br>
</div>
<div>Traceback (most recent call last):</div>
<div> File "../geneticsSubjects.py", line 212, in <module></div>
<div> dumpIDs()</div>
<div> File "<auto generated wrapper of dumpIDs() function>", line 2, in dumpIDs</div>
<div> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pony/orm/core.py", line 345, in new_func</div>
<div> try: return func(*args, **kwargs)</div>
<div> File "../geneticsSubjects.py", line 202, in dumpIDs</div>
<div> print( ID.__header__() )</div>
<div>UnboundLocalError: local variable 'ID' referenced before assignment</div>
<div><br>
</div>
<div><br>
</div>
<div></div>
</div>
<div style="word-wrap:break-word">
<div></div>
<div><br>
</div>
<div> Also, I have a documentation suggestion.for example, your documentation says:</div>
<div>
<blockquote type="cite">
<pre style="margin-top:0px; margin-bottom:0px; padding:9.5px; font-family:Consolas,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New'; font-size:15.5555562973022px; color:rgb(51,51,51); line-height:20px; word-break:break-all; word-wrap:break-word; white-space:pre-wrap; border:0px; text-align:justify; background-color:rgb(238,238,236); position:static; z-index:auto"><span class="x_k" style="margin:0px; padding:0px; color:rgb(32,74,135); font-weight:bold">for</span> <span class="x_n" style="margin:0px; padding:0px">p</span> <span class="x_ow" style="margin:0px; padding:0px; color:rgb(32,74,135); font-weight:bold">in</span> <span class="x_n" style="margin:0px; padding:0px">select</span><span class="x_p" style="margin:0px; padding:0px">(</span><span class="x_n" style="margin:0px; padding:0px">p</span> <span class="x_k" style="margin:0px; padding:0px; color:rgb(32,74,135); font-weight:bold">for</span> <span class="x_n" style="margin:0px; padding:0px">p</span> <span class="x_ow" style="margin:0px; padding:0px; color:rgb(32,74,135); font-weight:bold">in</span> <span class="x_n" style="margin:0px; padding:0px">Product</span><span class="x_p" style="margin:0px; padding:0px">):</span>
<span class="x_k" style="margin:0px; padding:0px; color:rgb(32,74,135); font-weight:bold">print</span> <span class="x_n" style="margin:0px; padding:0px">p</span><span class="x_o" style="margin:0px; padding:0px; color:rgb(206,92,0); font-weight:bold">.</span><span class="x_n" style="margin:0px; padding:0px">name</span><span class="x_p" style="margin:0px; padding:0px">,</span> <span class="x_n" style="margin:0px; padding:0px">p</span><span class="x_o" style="margin:0px; padding:0px; color:rgb(206,92,0); font-weight:bold">.</span><span class="x_n" style="margin:0px; padding:0px">price</span></pre>
</blockquote>
<div> whereas it is more convenient to say:</div>
</div>
<div><br>
</div>
<div>for p in Product.select():</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>