terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Typos in function comments? "iff" vs. "if"

Open jonitis opened this issue 6 years ago • 3 comments

This question or problem report applies to the codebase, not the documentation files. I've just noticed that comments for many functions in "Return Value:" part often contains "True iff ..." or "true iff ...". Currently there are 72 such lines in 19 files. In some cases "iff" is in the middle of sentence. I suspect it is typo, since many other function comments have expected "if " e.g. "True if there was a title to output.", but I still not sure that it does not have some special meaning in automatic documentation generation from code or something like that.

If that "iff" is typo that has somehow multiplied all over codebase, are you interested in pull request to fix that? There are other typos like "dsipatch"

jonitis avatar Dec 18 '19 11:12 jonitis

As far as "iff" is concerned - we use that as a shorthand for "if and only if". So those are totally intentional.

Other typos like "dsipatch" are probably unintentional. If you open a PR, we'd be happy to review those and make sure :)

zadjii-msft avatar Dec 18 '19 13:12 zadjii-msft

Ok. Thanks for clarification!

jonitis avatar Dec 18 '19 15:12 jonitis

indeed, “iff” is a very common shorthand (in our field)

retokromer avatar Dec 18 '19 15:12 retokromer