[New-bugs-announce] [issue23583] IDLE: printing unicode subclasses broken (again)

Martijn Pieters report at bugs.python.org
Wed Mar 4 15:59:48 CET 2015


New submission from Martijn Pieters:

This is a regression or recurrence of issue #19481. 

To reproduce, create a subclass of unicode and try and print an instance of that class:

class Foo(unicode): pass

print Foo()

results in a traceback:

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    print Foo()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 1353, in write
    s = unicode.__getslice__(s, None, None)
TypeError: an integer is required

because unicode.__getslice__ does not accept None for the start and end indices.

----------
messages: 237181
nosy: mjpieters
priority: normal
severity: normal
status: open
title: IDLE: printing unicode subclasses broken (again)
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23583>
_______________________________________


More information about the New-bugs-announce mailing list