On 23 February 2015 at 21:18, Serhiy Storchaka <storch...@gmail.com> wrote: > On 23.02.15 22:51, Paul Moore wrote: >> >> BTW, while I was looking at the API, I realised I don't like the order >> of arguments in pack(). I'm tempted to make it pack(directory, >> target=None, interpreter=None, main=None) where a target of None means >> "use the name of the source directory with .pyz tacked on", exactly as >> for the command line API. > > > If the order of arguments is not obvious, make them keyword-only.
To be honest, I don't think it *is* that non-obvious. I just think I got it wrong initially. With the new API, you have pack('myappdir') pack('myappdir', 'named_target.pyz') Seems obvious enough to me. It matches the "source, destination" order of similar functions like shutil.copy. And you can use a named argument if you're not sure. But I don't think it's worth forcing it. Paul _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com