On 2015-03-02 14:08, Dave Angel wrote:
On 03/02/2015 08:51 AM, alb wrote:
Hi Steven,
Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:
[snip]
Oh, by the way, "i" is normally a terrible variable name for a string. Not
only doesn't it explain what the variable is for, but there is a very
strong convention in programming circles (not just Python, but hundreds of
languages) that "i" is a generic variable name for an integer. Not a
string.
I'm not in the position to argue about good practices, I simply found
more appropriate to have i for input and o for output, considering they
are used like this:
i = "some string"
o = pypandoc.convert(i, ...)
f.write(o)
with very little risk to cause misunderstanding.
How about "in" and "out"? Or perhaps some name that indicates what
semantics the string represents, like "rst_string" and "html_string"
or whatever they actually are?
[snip]
"in" is a reserved word, but "in_" would be OK.
--
https://mail.python.org/mailman/listinfo/python-list