A wrapper to utils.parse_list() with unquoting support. Parses a specified set of data and breaks it into a list. Args: content (str): The path to split up into a list. If a list is provided, then it's individual entries are processed. allo
(content, allow_whitespace=True, unquote=True)
| 737 | |
| 738 | @staticmethod |
| 739 | def parse_list(content, allow_whitespace=True, unquote=True): |
| 740 | """A wrapper to utils.parse_list() with unquoting support. |
| 741 | |
| 742 | Parses a specified set of data and breaks it into a list. |
| 743 | |
| 744 | Args: |
| 745 | content (str): The path to split up into a list. If a list is |
| 746 | provided, then it's individual entries are processed. |
| 747 | |
| 748 | allow_whitespace (:obj:`bool`, optional): whitespace is to be |
| 749 | treated as a delimiter |
| 750 | |
| 751 | unquote (:obj:`bool`, optional): call unquote on each element |
| 752 | added to the returned list. |
| 753 | |
| 754 | Returns: |
| 755 | list: A unique list containing all of the elements in the path |
| 756 | """ |
| 757 | |
| 758 | content = parse_list(content, allow_whitespace=allow_whitespace) |
| 759 | if unquote: |
| 760 | content = [URLBase.unquote(x) for x in filter(bool, content)] |
| 761 | |
| 762 | return content |
| 763 | |
| 764 | @staticmethod |
| 765 | def parse_phone_no(content, unquote=True, prefix=False): |