Skip to content

Looping through empty list yields a None object #124159

@jwezel

Description

@jwezel

Bug report

Bug description:

I've stumbled over a seemingly impossible situation where a for loop over an empty list yields a None object in its body. The code starts on line 136 of module listconfig.py of OmegaConf. See the attached log of the terminal session demonstrating the effect.
situation.txt
situation-nocolor.txt

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions