[ python-Bugs-1184449 ] Read-only property attributes raise wrong exception

SourceForge.net noreply at sourceforge.net
Sun Apr 17 01:16:50 CEST 2005


Bugs item #1184449, was opened at 2005-04-16 19:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1184449&group_id=5470

Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Read-only property attributes raise wrong exception

Initial Comment:
In
http://mail.python.org/pipermail/python-dev/2005-April/052681.html
I describe how attributes defined as properties raise
inconsistent errors depending on whether the property
is defined in C or Python.  By default in C, you'll get
a TypeError while in Python you'll get an AttributeError.

I think both should raise AttributeErrors. Here is a
patch against Python 2.4 which should be ported to 2.5
(and possibly 2.3 if we care).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1184449&group_id=5470


More information about the Python-bugs-list mailing list