It depends on what people consider too complicated. I find it a tad complicated when someone posts using two different ID, and then wonders ...
The question related to taking a list and extending it and using the result in an assignment statement. There were several inter-related questions people responded to. One was asking why something did not work as expected. Several answers pointed out it was because it was not designed the way expected and reading the manual page or other reference material would help explain that you need to use code the way it was intended and not as you wish it. Other aspects of similar code that do what you expect were shown and you could pick any you liked. A second question some were answering is various ways to get the functionality wanted. Some were simple enough like using "+" and others did seem complex as they showed many variations on copying an object or how to make a subclass that effectively substitutes a method that returns the internally changed object. And, of course, we had the philosophical question of why the feature was designed to not return anything (well, NULL) rather than return the changed object. Returning nothing is arguably slightly more efficient in the many cases where the return value is simply ignored and thus tossed. But as mentioned, it would be nice for some purposes, including chaining, to be able to write something like result = lst.add_ret("item").sort_ret() As mentioned, this can still be easily done using something like: result = sorted(lst + "item") -----Original Message----- From: Python-list <python-list-bounces+avi.e.gross=gmail....@python.org> On Behalf Of dn Sent: Saturday, December 31, 2022 3:59 PM To: python-list@python.org Subject: Re: NoneType List On 31/12/2022 18.45, Goran Ikac wrote: ... > A few days (weeks?) ago, I faced a problem trying to write a program > for an exercise. I asked for help and nobody answered. Looking back over the last six months of List-Archives, your name does not appear against a single post. This may explain why "nobody answered". However, ten hours after the above/first message, you posted again. This time as "Thomas Passin". That was followed an hour-or-so later, with a reply-to-self saying: "Everyone's answer to date has been too complicated", and then basically repeating the information previously-provided by a number of contributors. It then goes on to talk about copying, sorting, adding, and even sets. Much of which you had earlier said: "I know". Was there a further question in there? Which part of which answer did you find "too complicated"? Did you try the experiments suggested, and read the references-provided? Please ask a further question detailing what you have understood, and what is still mystifying. Folk here endeavor to be helpful (see also, earlier reference to the Python-Tutor list). When asking a question here, please try to reduce the problem to its simplest form, so that you're not asking volunteers to read multiple-screens of irrelevant code. It will help to ask one question at a time, or to carefully separate multiple questions. Yes, this can be difficult when one is learning. That said, we all started somewhere and are happy to help you to become a valued colleague! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list