def __init__(self, pattern = '', recursive = False, file_only = False):
        """
        I do ugly type testing in here because I haven't quite
        grasped the concepts, I guess. I assume any user of this won't
        want to end up with a list containing a list when an instance is
        created.
        They just want a list, at least at first, so I type test to append()
        or extend().         
        """
        list.__init__(self)

        # if pattern is empty, we don't have to do any more
        if pattern != '':
            # assume at first that it's a single string. 
            try:
               temp = self._populate(pattern, recursive, file_only)
               # if wildcards, need to extend the list
               self._extendOrAppend(temp)
            except TypeError:
               # we may have been passed a list. Process
               # each separately, any of which can have wildcards.
               for fname in pattern:
                    if isinstance(fname, StringType):
                       temp = self._populate(fname, recursive, file_only)
                       self._extendOrAppend(temp)
                    else:
                        # Even lists can have lists!
                        # I'll break, though, if there are lists in lists in
                        # lists.
                        for f in fname:
                            temp = self._populate(f, recursive, file_only)
                            self._extendOrAppend(temp)

        I do ugly type testing in here because I haven't quite
        grasped the concepts, I guess. I assume any user of this won't
        want to end up with a list containing a list when an instance is
        created.
        They just want a list, at least at first, so I type test to append()
        or extend().         
        
recipes/Python/259147_FSList/recipe-259147.py