# HG changeset patch # User Paul Boddie # Date 1100219314 -3600 # Node ID 5dc683099d889961c59d1236191281014c82a0eb # Parent 49aa59d86e5c4d8741cd92f805e91a462b536f3b Added a mapping of type labels to Python types. diff -r 49aa59d86e5c -r 5dc683099d88 classfile.py --- a/classfile.py Fri Nov 12 01:27:34 2004 +0100 +++ b/classfile.py Fri Nov 12 01:28:34 2004 +0100 @@ -30,6 +30,19 @@ def f8(data): return struct.unpack(">d", data[0:8])[0] +descriptor_base_type_mapping = { + "B" : "int", + "C" : "str", + "D" : "float", + "F" : "float", + "I" : "int", + "J" : "int", + "L" : "object", + "S" : "int", + "Z" : "bool", + "[" : "list" + } + # Useful mix-ins. class PythonMethodUtils: