<div>Joop,</div>
<div> </div>
<div>I haven't been able to recreate your error.</div>
<div> </div>
<div>Please specify your version of Python and OS, and explain the steps required to recreate this error.</div>
<div> </div>
<div>- Tal<br><br> </div>
<div><span class="gmail_quote">On 28/11/06, <b class="gmail_sendername"><strong>Joop Kaldeway</strong> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:joop.kaldeway@planet.nl" target="_blank">joop.kaldeway@planet.nl
</a>></b> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span class="gmail_quote"><br></span>Dear idle-developers,.<br><br>I have the following problem:<br><br>I use the very simple program:
<br><br>class NewClass(object):<br><br> def __init__(self,element):<br> self.element = element<br><br> def __repr__(self):<br> return str(self.element)<br><br>if __name__ == '__main__':<br><br> b = NewClass(3)
<br> print b<br><br> raw_input("Press Enter to finish")<br><br>It runs with output:<br><br>3<br>Press Enter to finish<br><br>But when I use te debugger and walk through the code step by step I get<br>an error:
<br><br>...<br>...<br>File "E:\Python25\lib\repr.py", line 34, in repr1<br> s = __builtin__.repr(x)<br>File "F:\demo\NewClassDemo.py", line 24, in __repr__<br> return str(self.element)<br>AttributeError: 'NewClass' object has no attribute 'element'
<br>[DEBUG ON]<br>>>><br><br>Is it a bug in IDLE?<br><br>Joop Kaldeway<br><br><br><br>_______________________________________________<br>IDLE-dev mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:IDLE-dev@python.org" target="_blank">
IDLE-dev@python.org </a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.python.org/mailman/listinfo/idle-dev" target="_blank">http://mail.python.org/mailman/listinfo/idle-dev</a><br></blockquote>
</div><br>