Coding standard: Prefixing variables to indicate datatype

Martin Maney maney at pobox.com
Mon Jan 20 00:51:09 EST 2003


Jp Calderone <exarkun at intarweb.us> wrote:
>  "a b c".split(" ") makes sense.  " ".join(("a", "b", "c")) does, too.

Well, it certainly isn't completely senseless, no.

> ("a", "b", "c").join(" ") might make sense, but it would also involve
> writing a pile more code, and reducing the usefulness of the operation.

How does that reduce the usefulness?  Seems to me that it would allow
the restoration of the small conveninence of having a default
separator, as string.join() did.

> So why aim for consistency, when we can achieve usefulness instead?

Why do you think that it has to be either consistent or useful?




More information about the Python-list mailing list