Share

PyChecker

Tracker: Bugs

5 __unicode__ method gets erroneous warning - ID: 2169971
Last Update: Comment added ( nnorwitz )

The following sample code generates a warning about the __unicode__
method:

#!/usr/bin/env python
class Foo(object):
def __unicode__(self):
return u"Foo()"

test.py:3: __unicode__ is not a special method

But the Python documentation defines it as a special one:
http://docs.python.org/reference/datamodel.html#object.__unicode__


Tested with pychecker 0.8.18


Nobody/Anonymous ( nobody ) - 2008-10-16 00:25

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-11-17 05:44
Sender: nnorwitzProject Admin

You're right, this has been a special method probably since 2.0.

Fixed in pychecker/python.py 1.44


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2008-11-17 05:44 nnorwitz
resolution_id None 2008-11-17 05:44 nnorwitz
close_date - 2008-11-17 05:44 nnorwitz