blob: 03b8fb9b4e9fc015fa6c9e29d3f47f4f19643ddd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
"""don't want E1101 if __getattr__ is defined"""
__revision__ = None
class MyString(object):
"""proxied string"""
def __init__(self, string):
self.string = string
def __getattr__(self, attr):
return getattr(self.string, attr)
def lower(self):
"""string.lower"""
return self.string.lower()
def upper(self):
"""string.upper"""
return self.string.upper()
MYSTRING = MyString("abc")
print MYSTRING.title()
|