Skip to content

Negative _io.BufferedReader.tell #95782

Closed
@senyai

Description

@senyai

Bug report

I believe tell should never be negative, even for /dev/urandom. And @benjaminp wrote ToDo that it shouldn't be negative.

>>> from pathlib import Path
>>> urandom = Path('/dev/urandom').open('rb')
>>> urandom.tell()
0
>>> urandom.read(1)
b'$'
>>> urandom.tell()
-4095

Environment

Fedora linux, python 3.10.6

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions