2016-11-23 | Paul Boddie | raw files shortlog changelog graph | Automatically convert non-buffer, non-string objects to strings for appending. | |
lib/__builtins__/buffer.py (file) |
1.1 --- a/lib/__builtins__/buffer.py Wed Nov 23 14:24:53 2016 +0100 1.2 +++ b/lib/__builtins__/buffer.py Wed Nov 23 14:25:50 2016 +0100 1.3 @@ -53,7 +53,7 @@ 1.4 elif isinstance(s, string): 1.5 _list_append(self, s) 1.6 else: 1.7 - raise TypeError(s) 1.8 + _list_append(self, str(s)) 1.9 1.10 def __str__(self): 1.11