New submission from Walter Dörwald <[email protected]>:
In the current py3k branch setting an attribute of an object with PyMemberDefs
raises an internal error:
$ ./python.exe
Python 3.2a0 (py3k:78419M, Feb 24 2010, 17:56:06)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x = UnicodeEncodeError('ascii', 'gurk', 0, 4, 'broken')
[37539 refs]
>>> x.start = None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: Objects/longobject.c:439: bad argument to internal function
In Python 2.6.4 (and in the current trunk version) this raises a proper
TypeError:
$ python
Python 2.6.4 (r264:75706, Oct 27 2009, 15:18:04)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x = UnicodeEncodeError('ascii', u'gurk', 0, 4, 'broken')
>>> x.start = None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: an integer is required
----------
messages: 100051
nosy: doerwalter
severity: normal
status: open
title: Setting a T_INT attribute raises internal error
type: behavior
versions: Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8014>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com