[Python-bugs-list] [ python-Bugs-671439 ] fix for 569257 isn't in 2.2.2 - __slots__ still not mangled
SourceForge.net
noreply@sourceforge.net
Mon, 20 Jan 2003 14:45:06 -0800
Bugs item #671439, was opened at 2003-01-20 16:45
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=671439&group_id=5470
Category: Type/class unification
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Jess Austin (jessaustin)
Assigned to: Nobody/Anonymous (nobody)
Summary: fix for 569257 isn't in 2.2.2 - __slots__ still not mangled
Initial Comment:
hi,
Perhaps this isn't the right way to notify you that a patch
didn't make it in. If so I'm sorry.
I'm concerned that the fix for bug #569257 didn't make it
into Python 2.2.2 on Windows. My description of the
bug, that I had written before I noticed #569257, follows.
The original bug seems to have been resolved last June.
I would have expected it to show up in 2.2.2.
thanks,
Jess Austin
<description of bug>
Variables listed in __slots__ for a new-style class that
start with double underscores are not mangled.
Entering the following code:
class a(object):
__slots__ = ['__x']
def __init__(self, x):
self.__x = x
m = a(1)
Yields the following exception:
Traceback (most recent call last):
File "<input>", line 1, in ?
File "<input>", line 4, in __init__
AttributeError: 'a' object has no attribute '_a__x'
Whereas entering the following returns 1 just as one
would expect:
class b(object):
__slots__ = ['_b__x']
def __init__(self, x):
self.__x = x
n = b(1)
n._b__x
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=671439&group_id=5470