On Mon, Nov 28, 2016 at 1:16 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote:
> > > There is no need to return True. The function either succeeds, or it > raises an > exception, so there is no need to return any value at all. > > I returned True here ,because based on the result of this function , I would want to perform next steps Example if create_files_append(): do_somthing() else: do_next_thing() > > Your comment says "append the files", but you're not appending to the > files, > you are overwriting them. So your code is better written like this: > > Yes , correct and apologies there was a typo it should have been 'a' instead of 'w' . Thanks for the comments -- https://mail.python.org/mailman/listinfo/python-list