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
|
Date: 2008-11-17 05:44 You're right, this has been a special method probably since 2.0. |
| 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 |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use