sync from Atlas repo

This commit is contained in:
Luciano Ramalho
2014-11-14 12:03:10 -02:00
parent 661b68b235
commit 6dbc75520f
20 changed files with 2281 additions and 31 deletions

View File

@@ -206,10 +206,10 @@ class Vector:
def __getattr__(self, name):
cls = type(self) # <1>
if len(name) == 1: # <2>
pos = cls.shortcut_names.find(name) # <3>
if 0 <= pos < len(self._components): # <4>
pos = cls.shortcut_names.find(name) # <3>
if 0 <= pos < len(self._components): # <4>
return self._components[pos]
msg = '{.__name__!r} object has no attribute {!r}' # <5>
msg = '{.__name__!r} object has no attribute {!r}' # <5>
raise AttributeError(msg.format(cls, name))
# END VECTOR_V3_GETATTR
@@ -230,7 +230,6 @@ class Vector:
# END VECTOR_V3_SETATTR
@classmethod
def frombytes(cls, octets):
typecode = chr(octets[0])