This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update/change built-in keyword type used in RE example
Type: Stage: resolved
Components: Documentation Versions: Python 3.10
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.smith, vivekvashist
Priority: normal Keywords:

Created on 2021-12-20 10:40 by vivekvashist, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg408951 - (view) Author: Vivek Vashist (vivekvashist) * Date: 2021-12-20 10:40
Link: https://docs.python.org/3/library/re.html#writing-a-tokenizer

Noticed that built-in type() class is being used inside the Tokenizer example:

class Token(NamedTuple):
    type: str
    value: str
    line: int
    column: int

Should this attribute be updated/renamed to kind or name perhaps ? 

Happy to submit a PR once the change/replacement is confirmed.
msg408955 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-12-20 11:53
"type" is a natural name to use in this example, and isn't causing any problems. I suggest not changing anything.
msg408974 - (view) Author: Vivek Vashist (vivekvashist) * Date: 2021-12-20 21:48
Thanks Eric.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90295
2021-12-20 21:48:17vivekvashistsetstatus: open -> closed
resolution: not a bug
stage: resolved
2021-12-20 21:48:00vivekvashistsetmessages: + msg408974
2021-12-20 11:53:32eric.smithsetnosy: + eric.smith
messages: + msg408955
2021-12-20 10:40:08vivekvashistcreate