On Mon, Aug 2, 2010 at 12:53 AM, Richard D. Moores <rdmoo...@gmail.com> wrote: > On Sun, Aug 1, 2010 at 15:00, Richard D. Moores <rdmoo...@gmail.com> wrote: >> On Sun, Aug 1, 2010 at 14:44, Daniel Sarmiento <dsarmien...@gmail.com> wrote: >>> > >>> Without knowing what your code does, I think it will be something like: >>> >>> try: >>> F_unused = open(path1, 'rb') >>> F_used = open(path2, 'rb') >>> except IOError: >>> print("no") >>> ..... >>> else: >>> unused_ints = pickle.load(F_unused) > > OK. Did that. And it works: <http://tutoree7.pastebin.com/EDgwU6Ac>. > Now what? Am I done? Or should I break it up into a bunch of > functions, each one doing just one thing? >
For a script this short, you could probably get away with just leaving it here. However, I mean that in a "if you're really lazy, I suppose you could" way. It will become easier to understand if you break it up, and that is good for your future sanity. So it's not required, but it definitely can't hurt, and if this script gets any larger you will be glad you broke it up. Hugo _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor