Skip to content

docs: fix tmpfile('f2.txt') example output filename - #1507

Open
Aparajith24 wants to merge 2 commits into
google:mainfrom
Aparajith24:fix/tmpfile-docs-typo
Open

docs: fix tmpfile('f2.txt') example output filename#1507
Aparajith24 wants to merge 2 commits into
google:mainfrom
Aparajith24:fix/tmpfile-docs-typo

Conversation

@Aparajith24

Copy link
Copy Markdown

What

Fixes a typo in the tmpfile() example in docs/api.md. The example shows:

f2 = tmpfile('f2.txt') // /os/based/tmp/zx-1ra1iofojgg/foo.txt

The output comment says foo.txt, but it should be f2.txt to match the filename actually passed into tmpfile().

Why

This is confusing for anyone reading the docs to understand how tmpfile() works — the output path doesn't match the input, making it look like the function renames the file for no reason.

Change

Updated the comment from foo.txt to f2.txt in the example.

Fixes #1469

The example output for tmpfile('f2.txt') incorrectly showed foo.txt instead of f2.txt, which didn't match the input filename.

Fixes google#1469
@google-cla

google-cla Bot commented Aug 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Aparajith24

Copy link
Copy Markdown
Author

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

recheck

@Aparajith24 Aparajith24 reopened this Aug 23, 2026
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

Successfully merging this pull request may close these issues.

docs(api): tmpfile('f2.txt') example shows wrong output filename (foo.txt)

1 participant