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

Two typos in the docs #58024

Closed
Retro mannequin opened this issue Jan 18, 2012 · 23 comments
Closed

Two typos in the docs #58024

Retro mannequin opened this issue Jan 18, 2012 · 23 comments
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@Retro
Copy link
Mannequin

Retro mannequin commented Jan 18, 2012

BPO 13816
Nosy @birkenfeld, @terryjreedy, @ezio-melotti
Files
  • hyphen_removed_key_function.diff: removed hyphen
  • i_th_hyphen.diff: changed apostrophe to hyphen
  • issue13816.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-01-23.21:12:48.938>
    created_at = <Date 2012-01-18.16:23:14.914>
    labels = ['type-feature', 'docs']
    title = 'Two typos in the docs'
    updated_at = <Date 2012-01-23.21:12:48.937>
    user = 'https://bugs.python.org/Retro'

    bugs.python.org fields:

    activity = <Date 2012-01-23.21:12:48.937>
    actor = 'georg.brandl'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2012-01-23.21:12:48.938>
    closer = 'georg.brandl'
    components = ['Documentation']
    creation = <Date 2012-01-18.16:23:14.914>
    creator = 'Retro'
    dependencies = []
    files = ['24273', '24274', '24302']
    hgrepos = []
    issue_num = 13816
    keywords = ['patch']
    message_count = 23.0
    messages = ['151547', '151551', '151552', '151553', '151558', '151721', '151743', '151766', '151767', '151768', '151775', '151786', '151787', '151810', '151811', '151816', '151817', '151820', '151821', '151822', '151830', '151836', '151837']
    nosy_count = 7.0
    nosy_names = ['georg.brandl', 'terry.reedy', 'ezio.melotti', 'Retro', 'docs@python', 'python-dev', 'dontknow']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13816'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 18, 2012

    There's a typo in the docs for cmp_to_key() function. Fix the first sentence "Transform an old-style comparison function to a key-function." to "Transform an old-style comparison function to a key function." (delete the hyphen between words "key" and "function")

    http://docs.python.org/library/functools.html#functools.cmp_to_key

    ------------------------------------------------------------------

    There's another typo in the docs lurking in http://docs.python.org/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange

    Look for the table with the columns "Operation", "Result", "Notes" (scroll down and you'll find it), and fix the text of the fifth cell under the "Result" column like this:
    "i'th item of s, origin 0" --> "i-th item of s, origin 0".

    Change that apostrophe into a hyphen, so "i'th" to "i-th". Thanks, Ezio.

    @Retro Retro mannequin assigned docspython Jan 18, 2012
    @Retro Retro mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jan 18, 2012
    @skrah
    Copy link
    Mannequin

    skrah mannequin commented Jan 18, 2012

    Just as a note: It is not acceptable to be rude on the tracker or
    to remove people from the nosy list as you did in bpo-13695.

    @birkenfeld
    Copy link
    Member

    And not really working, as I get updates for all assignments to docs@python anyway.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 18, 2012

    I am deeply and truly sorry. Can we now fix this?

    @dontknow
    Copy link
    Mannequin

    dontknow mannequin commented Jan 18, 2012

    Removed the hyphen in function keys.
    Didn't really see a problem with using an apostrophe in 'ith' instead of a hyphen because I have seen it done both ways but changed it anyways.
    This is my first contribution so i needed the practice. Hope I did everything correctly.

    @terryjreedy
    Copy link
    Member

    The Chicago Manual of Style. which is perhaps the mostly widely used general style manual in the US, uses 'th' as a suffix without ' or -.
    ie, 28th, etc except for 22d ('preferred' to 22nd) and 23d ('preferred' to 23rd).

    https://en.wiktionary.org/wiki/nth
    gives nth, which I use, with *n*th (italic n) as alternate form (when italic is available) and n'th and n-th as 'sometimes used'. I think both of the last two are ugly and that we should use either nth or, since we can, *n*th. I see that we already have *i*.

    @skrah
    Copy link
    Mannequin

    skrah mannequin commented Jan 21, 2012

    ... with *n*th (italic n) as alternate form

    Knuth uses that in TAOCP, too. I think with or without italics it's
    the most frequently used form overall.

    Also the Lisp function is called nth and not n-th, even though in Lisp
    it is possible to use hyphens in function names.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 22, 2012

    Terry, I agree with you on having *i*th instead of *i*-th. The fact that "i" is written in italics eliminates the need of a hyphen.

    Justin, can I ask you to make a new patch which fixes "key-function" to "key function" and *i*'th to *i*th

    This is the last decision. Also, if anyone of you can, please then just incorporate that final patch that Justin will make. Thanks.

    @skrah
    Copy link
    Mannequin

    skrah mannequin commented Jan 22, 2012

    This is the last decision. Also, if anyone of you can, please then just > incorporate that final patch that Justin will make. Thanks.

    Stop acting like a manager. A while ago a person had his account
    disabled for constantly bumping up issues and telling other people
    what to do.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 22, 2012

    Yeah, I guess I was kind of rude. Sorry about that. I think my proposal is acceptable. What do you think?

    @terryjreedy
    Copy link
    Member

    Justin, if you do a new patch, put both changes in one .diff.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 22, 2012

    I fixed Justin's patch. Anyone cares to incorporate it?

    @birkenfeld
    Copy link
    Member

    Sorry, but the patch introduces two markup errors:

    • *i*th is invalid reST, it needs to be *i*\ th
    • you broke the table markup (the vertical lines must be aligned)

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 23, 2012

    Georg, thanks for the tip. Is there any difference in reST between i\ th and i\th ?

    @ezio-melotti
    Copy link
    Member

    You can check on the devguide the section about building the doc and see it yourself on the generated HTML. While building you will also see all the warnings caused by invalid markup.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 23, 2012

    I hope the patch is now good. What do you think?

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 23, 2012

    Ah, darn it! My last patch is a total garbage. But then an interesting thing happened: I wanted to delete my last patch set, but I got a

    "ProgrammingError at /review/13816/patchset/4039/delete
    schema "datetime" does not exist"

    and got all the Django nitty-gritty info about your server. This is not good because someone can misuse that information. Please fix this. You have "DEBUG = True" set and so all the details of your server is leaked. Better change that to "DEBUG = False" and let the user get a standard 500 error page instead.

    It says at the bottom: "You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page."

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 23, 2012

    I wasn't able to remove the patch via "Delete Patch Set" but I did it by clicking on the Unlink button. So the "Delete Patch Set" option has a bug.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 23, 2012

    Georg, I object to your comment about *i*th needing to be *i*\ th

    because currently in the source code we have it written as *i*'th which, by your logic, would need to be written as *i*\ 'th

    which is not so and is compiled/displayed/whatever perfectly as is, so *i*th would be compiled/displayed/whatever, too.

    @Retro
    Copy link
    Mannequin Author

    Retro mannequin commented Jan 23, 2012

    This stupid HG is so cryptic. SVN was so easy, now I can't even create a patch. Can you just fix those two typos as "key function" and "*i*th" please? Thank you.

    @dontknow
    Copy link
    Mannequin

    dontknow mannequin commented Jan 23, 2012

    Fixed.

    @birkenfeld
    Copy link
    Member

    1. Please report issues with the tracker to the meta-tracker at http://psf.upfronthosting.co.za/roundup/meta/.

    2. You may object all you want, *i*th is invalid reST and a very quick tryout with "rst2html" would have shown you that.

    3. Lastly, it is usual to test patches before submitting. Had you tried to build your changed docs instead of complaining here, you might have been enlightened.

    Justin: thanks for the patch.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 23, 2012

    New changeset a72ca8b23cdf by Georg Brandl in branch '3.2':
    bpo-13816: fix two minor style issues. Thanks to Justin Wehnes for the patch.
    http://hg.python.org/cpython/rev/a72ca8b23cdf

    New changeset f4f9ab2fd51b by Georg Brandl in branch '2.7':
    bpo-13816: fix two minor style issues. Thanks to Justin Wehnes for the patch.
    http://hg.python.org/cpython/rev/f4f9ab2fd51b

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants