Mercurial > cgi-bin > hgweb.cgi > curlyq
changeset 20:be0fd5c8121d
Can't use memoryview to base Runes on; different methods inside.
author | David Barts <n5jrn@me.com> |
---|---|
date | Sat, 28 Dec 2019 01:22:03 -0800 |
parents | f8d0a5201dd7 |
children | 35f29952b51e |
files | runes.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/runes.py Sat Dec 28 00:46:38 2019 -0800 +++ b/runes.py Sat Dec 28 01:22:03 2019 -0800 @@ -25,9 +25,8 @@ codec = codecs.lookup(encoding) def __init__(self, based_on=None): - if isinstance(based_on, (array.array, memoryview)): - format = based_on.typecode if isinstance(based_on, array.array) else based_on.format - if format == 'H': + if isinstance(based_on, array.array): + if based_on.typecode == 'H': self.buffer = based_on else: self.buffer = array.array('H', based_on)