A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-February/138473.html below:

[Python-Dev] Request for Pronouncement: PEP 441

[Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application SupportPaul Moore p.f.moore at gmail.com
Mon Feb 23 22:42:25 CET 2015
On 23 February 2015 at 21:18, Serhiy Storchaka <storchaka at 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4