summaryrefslogtreecommitdiff
path: root/pokemontools/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-09-01 15:57:02 -0500
committerBryan Bishop <kanzure@gmail.com>2013-09-01 15:57:02 -0500
commitf666fcb67de7ed9893873dc87462716bef0155b3 (patch)
tree387f1bc06dce95ccd703adfcbebd8bde1f03da78 /pokemontools/crystal.py
parenta1d9fd778dd8c86c810583c9c6bf76f709a35041 (diff)
move flatten and flattener into helpers
Diffstat (limited to 'pokemontools/crystal.py')
-rw-r--r--pokemontools/crystal.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/pokemontools/crystal.py b/pokemontools/crystal.py
index 753095a..6f09274 100644
--- a/pokemontools/crystal.py
+++ b/pokemontools/crystal.py
@@ -6785,21 +6785,6 @@ def to_asm(some_object, use_asm_rules=False):
asm += "\n; " + hex(last_address)
return asm
-def flattener(x):
- "flattens a list of sublists into just one list (generator)"
- try:
- it = iter(x)
- except TypeError:
- yield x
- else:
- for i in it:
- for j in flattener(i):
- yield j
-
-def flatten(x):
- "flattens a list of sublists into just one list"
- return list(flattener(x))
-
def get_dependencies_for(some_object, recompute=False, global_dependencies=set()):
"""
calculates which labels need to be satisfied for an object