1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

move _get_item outside of parse function

This commit is contained in:
Kelly Brazil
2022-06-02 08:31:28 -07:00
parent f86cbf5527
commit ec8efebc94

View File

@ -144,6 +144,13 @@ def _process(proc_data):
return proc_data
def _get_item(list, index, default=None):
if index < len(list):
return list[index]
return default
def parse(data, raw=False, quiet=False):
"""
Main text parsing function
@ -158,12 +165,6 @@ def parse(data, raw=False, quiet=False):
Dictionary. Raw or processed structured data.
"""
def _get_item(list, index, default=None):
if index < len(list):
return list[index]
return default
jc.utils.compatibility(__name__, info.compatible, quiet)
jc.utils.input_type_check(data)