Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unintended changes occur when dealing with list of list #71646

Closed
ZhihanChen mannequin opened this issue Jul 6, 2016 · 4 comments
Closed

unintended changes occur when dealing with list of list #71646

ZhihanChen mannequin opened this issue Jul 6, 2016 · 4 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@ZhihanChen
Copy link
Mannequin

ZhihanChen mannequin commented Jul 6, 2016

BPO 27459
Nosy @stevendaprano, @eryksun
Files
  • Screenshot from 2016-07-05 16-44-14.png
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-07-06.00:14:53.371>
    created_at = <Date 2016-07-06.00:07:52.409>
    labels = ['type-bug', 'invalid']
    title = 'unintended changes occur when dealing with list of list'
    updated_at = <Date 2016-07-06.01:57:12.065>
    user = 'https://bugs.python.org/ZhihanChen'

    bugs.python.org fields:

    activity = <Date 2016-07-06.01:57:12.065>
    actor = 'Zhihan Chen'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-07-06.00:14:53.371>
    closer = 'eryksun'
    components = ['Demos and Tools']
    creation = <Date 2016-07-06.00:07:52.409>
    creator = 'Zhihan Chen'
    dependencies = []
    files = ['43633']
    hgrepos = []
    issue_num = 27459
    keywords = []
    message_count = 4.0
    messages = ['269858', '269860', '269861', '269866']
    nosy_count = 3.0
    nosy_names = ['steven.daprano', 'eryksun', 'Zhihan Chen']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27459'
    versions = ['Python 3.5']

    @ZhihanChen
    Copy link
    Mannequin Author

    ZhihanChen mannequin commented Jul 6, 2016

    When creating list of list with multiplication, changing one element of a list will result in changing all lists.

    @ZhihanChen ZhihanChen mannequin added the type-bug An unexpected behavior, bug, or error label Jul 6, 2016
    @ZhihanChen ZhihanChen mannequin changed the title unintended changes occurs when dealing with list of list unintended changes occur when dealing with list of list Jul 6, 2016
    @eryksun
    Copy link
    Contributor

    eryksun commented Jul 6, 2016

    This is by design. Please read the answer for the frequently asked question "How do I create a multidimensional list?":

    https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list

    @eryksun eryksun closed this as completed Jul 6, 2016
    @eryksun eryksun added the invalid label Jul 6, 2016
    @stevendaprano
    Copy link
    Member

    Hi Zhihan Chen, I see this issue is closed, but for future reference please don't post screenshots to report issues unless they are really needed. For text output, just copy the text from your terminal and paste it into your bug report. Making a screen shot is more work for you, less useful for us, and makes it impossible for the blind and visually impaired to read it using a screen-reader.

    @ZhihanChen
    Copy link
    Mannequin Author

    ZhihanChen mannequin commented Jul 6, 2016

    Oh I am really sorry for my carelessness. Please accept my apology. and thank you Steven, I will pay special attention to that.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants