This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: (list).insert() not working
Type: behavior Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Chance Parsons, Michael Selik, steven.daprano
Priority: normal Keywords:

Created on 2017-11-01 01:30 by Chance Parsons, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Times Tables.py Chance Parsons, 2017-11-01 01:30
Messages (2)
msg305350 - (view) Author: Michael Selik (Michael Selik) Date: 2017-11-01 01:58
What behavior did you expect from your code?
What behavior did you get instead?

It looks like you're not calling the list copy method correctly. Try writing "tables2.copy()" instead of "tables2.copy". It also looks like you have other bugs in your code.

This forum is for reporting bugs in the Python language. If you'd like help with bugs in your own code, try asking on StackOverflow (https://stackoverflow.com/) or on the Python Help mailing list (https://mail.python.org/mailman/listinfo/python-help).
msg305355 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2017-11-01 03:37
Thank you for taking the time to report what you thought was a bug, but your example is way too complicated for a bug report. We shouldn't have to study your entire program to understand what the problem is.

I can see at least one bug in your code:

    tbles = tables2.copy

sets the variable "tbles" as an alias to the "tables2.copy" method, and of course methods don't have an insert method themselves. So I'm closing this as "Not a bug". If you disagree, feel free to re-open the ticket with more information.

In future, please always report the SIMPLEST example of the bug that you can write. Tell us what you expected to happen, and COPY AND PASTE (no screenshots) the error message that you get, or other unexpected result.

You might also find it useful to read this page:

http://sscce.org/

It is written in terms of Java, but the principles apply equally to every programming language.

Thank you.
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76096
2017-11-01 03:37:48steven.dapranosetstatus: open -> closed
stage: resolved
2017-11-01 03:37:07steven.dapranosetresolution: not a bug

messages: + msg305355
nosy: + steven.daprano
2017-11-01 01:58:01Michael Seliksetnosy: + Michael Selik
messages: + msg305350
2017-11-01 01:30:20Chance Parsonscreate