Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar issue on: http://www.diveintopython3.net/regular-expressions.html#summary #50

Open
cezaryzukowski opened this issue Jul 4, 2017 · 2 comments

Comments

@cezaryzukowski
Copy link

On http://www.diveintopython3.net/regular-expressions.html#summary there is:

"* x? matches an optional x character (in other words, it matches an x zero or one times)."

Should it not be "one time" without 's' character (form more suitable grammatically)?

@alecthegeek
Copy link

Or ""* x? matches an optional x character (in other words, it matches an x zero or once only)."

@cezaryzukowski
Copy link
Author

cezaryzukowski commented Sep 8, 2017

Exactly, "once only" may suit or anything else indicating the singular and that it is single.

As far as I remember the grammar concerning "and" and "or" statements:

  • AND implies the plural ("s" attached),
  • OR implies the singular (without "s").

So,

  • OR - "zero or one time" or "zero or once only" - is grammatically correct (without "s"),
  • AND - "zero and one times" - is still grammatically correct (the plural form), but sounds odd logically since both "zero and one times" can not occur at the same time.

I know it's a tiny issue; therefore, do not bother about it overly much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants