docstrings

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@28 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
henryk 2005-10-03 05:19:53 +00:00
parent bed37517c6
commit 5720cb30f6
1 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ def _unformat_hexdump(dump):
class APDU(list): class APDU(list):
"""Class for an APDU that mostly behaves like a list."""
OFFSET_CLA = 0 OFFSET_CLA = 0
OFFSET_INS = 1 OFFSET_INS = 1
OFFSET_P1 = 2 OFFSET_P1 = 2
@ -98,7 +99,6 @@ class APDU(list):
LC_AUTO = None LC_AUTO = None
"""Class for an APDU that mostly behaves like a list."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Creates a new APDU instance. Can be given positional parameters which """Creates a new APDU instance. Can be given positional parameters which
must be sequences of either strings (or strings themselves) or integers must be sequences of either strings (or strings themselves) or integers
@ -195,6 +195,7 @@ class APDU(list):
return result return result
def get_string(self): def get_string(self):
"""Return the contents of this APDU as a binary string."""
return "".join([i is not None and chr(i) or "?" for i in self]) return "".join([i is not None and chr(i) or "?" for i in self])
if __name__ == "__main__": if __name__ == "__main__":