Mercurial > cgi-bin > hgweb.cgi > curlyq
diff runes.py @ 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 | 0c8d787bc7e1 |
children | 35f29952b51e |
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)