Content-Length: 263998 | pFad | http://github.com/pikasTech/PikaPython/issues/322

76 dict.items() set/list/tuple value segmentation fault & reverse items loop · Issue #322 · pikasTech/PikaPython · GitHub
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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/pikasTech/PikaPython/issues/322

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy