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


Groups > comp.lang.python > #46370

Re: Fatal Python error

Date 2013-05-29 08:25 -0400
From Dave Angel <davea@davea.name>
Subject Re: Fatal Python error
References <CAN1F8qXPEM4B=2e7KOhWeTKzxmeeb_w_S97wYiHCMXH3jfzL6g@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2350.1369830325.3114.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web