This commit is contained in:
Luciano Ramalho
2014-10-16 00:23:44 -03:00
parent 981d5bc473
commit 5d212ad3cf
10 changed files with 837 additions and 19 deletions

View File

@@ -110,6 +110,5 @@ class Vector:
@classmethod
def frombytes(cls, octets):
arr = array(Vector.typecode)
arr.frombytes(octets)
return cls(*arr)
memv = memoryview(octets).cast(cls.typecode)
return cls(*memv)