Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46370 > unrolled thread

Re: Fatal Python error

Started byDave Angel <davea@davea.name>
First post2013-05-29 08:25 -0400
Last post2013-05-29 08:25 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Fatal Python error Dave Angel <davea@davea.name> - 2013-05-29 08:25 -0400

#46370 — Re: Fatal Python error

FromDave Angel <davea@davea.name>
Date2013-05-29 08:25 -0400
SubjectRe: Fatal Python error
Message-ID<mailman.2350.1369830325.3114.python-list@python.org>
On 05/29/2013 07:48 AM, Joshua Landau wrote:
> Hello all, again. Instead of revising like I'm meant to be, I've been
> delving into a bit of Python and I've come up with this code:
>

To start with, please post in text mode.  By using html, you've 
completely messed up any indentation you presumably had.

> class ClassWithProperty:
>   @property
> def property(self):
> pass

Did you really mean to hide the built-in property?  I don't know if this 
does that, but it's certainly confusing.  And perhaps that's a 
difference between 2.x and 3.x

>
> thingwithproperty = ClassWithProperty()
>
> def loop():
> try:
> thingwithproperty.property
>   except:
> pass
>
> loop()
>
> try:
> loop()
> except RuntimeError:
> pass
>
> As you will expect, this does nothing... on Python2.7 and PyPy. Python3.3
> prefers to spit out a "Fatal Python error: Cannot recover from stack
> overflow.", which seems a bit unexpected.
>

A stack overflow means you have infinite recursion.  Try fixing the 
property name above, and see if that makes a difference.



-- 
DaveA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web