Why should input(prompt="hello:") fail?

Fredrik Lundh fredrik at pythonware.com
Tue Nov 25 09:13:31 CET 2003


"djw" <donald.welch.nospam at hp.com> wrote:

> Doesn't this have more to do with the difference between C-based and Python
> based modules in the std. lib?
>
> Discussion on this topic:
> http://tinyurl.com/wcgn
>
> My spot checking indicates that you can use keyword args as shown in the
> documentation, as long as its a Python based module. C-based modules seem
> to be hit-or-miss, some support it, some don't. I actually think this could
> be an improvement to the docs - actually show the way the function is
> defined so that it is clear what (if any) keyword args are possible.

if you care the slightest about maintainability, don't use keyword arguments
unless the documentation *explicitly* says that you can or should.

and if the documentation says that you *should* use keyword arguments,
don't use positional arguments just because you think you can.

</F>








More information about the Python-list mailing list