diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
commit | 182b5aca27d376b08a2904bed42b751496f932f3 (patch) | |
tree | df13115820dbc879c0fe2eae488c9f8c0215a7da /Lib/plat-mac/aepack.py | |
parent | e6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff) | |
download | cpython-182b5aca27d376b08a2904bed42b751496f932f3.zip cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2 |
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Lib/plat-mac/aepack.py')
-rw-r--r-- | Lib/plat-mac/aepack.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/plat-mac/aepack.py b/Lib/plat-mac/aepack.py index 22dfd21..529a0a4 100644 --- a/Lib/plat-mac/aepack.py +++ b/Lib/plat-mac/aepack.py @@ -74,16 +74,16 @@ def packkey(ae, key, value): def pack(x, forcetype = None): """Pack a python object into an AE descriptor""" - + if forcetype: if type(x) is StringType: return AE.AECreateDesc(forcetype, x) else: return pack(x).AECoerceDesc(forcetype) - + if x == None: return AE.AECreateDesc('null', '') - + if isinstance(x, AEDescType): return x if isinstance(x, FSSType): @@ -128,11 +128,11 @@ def pack(x, forcetype = None): def unpack(desc, formodulename=""): """Unpack an AE descriptor to a python object""" t = desc.type - + if unpacker_coercions.has_key(t): desc = desc.AECoerceDesc(unpacker_coercions[t]) t = desc.type # This is a guess by Jack.... - + if t == typeAEList: l = [] for i in range(desc.AECountItems()): @@ -248,7 +248,7 @@ def unpack(desc, formodulename=""): record = desc.AECoerceDesc('reco') return mklogical(unpack(record, formodulename)) return mkunknown(desc.type, desc.data) - + def coerce(data, egdata): """Coerce a python object to another type using the AE coercers""" pdata = pack(data) @@ -311,10 +311,10 @@ def mklogical(dict): def mkstyledtext(dict): return aetypes.StyledText(dict['ksty'], dict['ktxt']) - + def mkaetext(dict): return aetypes.AEText(dict[keyAEScriptTag], dict[keyAEStyles], dict[keyAEText]) - + def mkinsertionloc(dict): return aetypes.InsertionLoc(dict[keyAEObject], dict[keyAEPosition]) @@ -355,7 +355,7 @@ def mkobjectfrommodule(dict, modulename): assert issubclass(classtype, ObjectSpecifier) newobj.__class__ = classtype return newobj - + def mktype(typecode, modulename=None): if modulename: module = __import__(modulename) |