Skip to content

dict.items() set/list/tuple value segmentation fault & reverse items loop #322

Open
@ghost

Description

I'm not entirely sure on Python 3 version differences so I'm not entirely sure if these are considered issues for PikaPython. But I'm creating this issue just in case if these are considered issues.

I tested this code and it results in segmentation fault. It does not matter if it's using (), {} or [], all of them seg fault.

dict = {
    'a': {1, 2, 3},
    'b': {4, 5, 6},
    'c': {7, 8, 9},
}

for k, (a, b, c) in dict.items():
    print(k, ':', a, b, c)

Another thing that was unexpected to me was this going through the dictionary in reverse.

dict = {
    'a': 1,
    'b': 4,
    'c': 7,
}

for k, a in dict.items():
    print(k, ':', a)

Output:

c : 7
b : 4
a : 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy