Revision 4492
Added by Aaron Marcuse-Kubitza over 12 years ago
objects.py | ||
---|---|---|
1 | 1 |
# Objects |
2 | 2 |
|
3 |
import strings |
|
3 | 4 |
import util |
4 | 5 |
|
5 | 6 |
class BasicObject: |
6 | 7 |
'''Provides default implementations of commonly-used methods''' |
7 | 8 |
|
8 |
def __str__(self): return util.class_name(self)+repr(self.__dict__) |
|
9 |
def __str__(self): return util.class_name(self)+strings.urepr(self.__dict__)
|
|
9 | 10 |
|
10 | 11 |
def __repr__(self): return self.__str__() |
11 | 12 |
|
Also available in: Unified diff
Replaced repr() with strings.urepr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors