@nilamo no, I don´t want to copy a list inside a function, all what I need is this function should work for changes in a list. For example, after __init__ (which creates a list self.tab) I want __str__() to create a string from this list. Using the code by @buran few posts above it works, but I need to call this method also later, after some changes in this self.tab happen. And these are specifically "." changed to a set. After this, method __str__() create a string consisting of numbers and sets, but I still want to put "." instead of sets here.
Magic method __str__
Magic method __str__
|
|
Messages In This Thread |
Magic method __str__ - by dan789 - Dec-18-2018, 04:11 PM
RE: Magic method __str__ - by stullis - Dec-18-2018, 04:55 PM
RE: Magic method __str__ - by Gribouillis - Dec-18-2018, 05:39 PM
RE: Magic method __str__ - by dan789 - Dec-18-2018, 07:17 PM
RE: Magic method __str__ - by buran - Dec-18-2018, 07:32 PM
RE: Magic method __str__ - by dan789 - Dec-18-2018, 08:12 PM
RE: Magic method __str__ - by buran - Dec-18-2018, 08:15 PM
RE: Magic method __str__ - by dan789 - Dec-18-2018, 08:37 PM
RE: Magic method __str__ - by Gribouillis - Dec-18-2018, 08:44 PM
RE: Magic method __str__ - by nilamo - Dec-18-2018, 09:04 PM
RE: Magic method __str__ - by dan789 - Dec-19-2018, 02:15 PM
RE: Magic method __str__ - by dan789 - Dec-22-2018, 03:55 PM
RE: Magic method __str__ - by ichabod801 - Dec-22-2018, 05:26 PM
RE: Magic method __str__ - by dan789 - Dec-22-2018, 07:43 PM
RE: Magic method __str__ - by ichabod801 - Dec-22-2018, 08:13 PM
RE: Magic method __str__ - by dan789 - Dec-23-2018, 10:11 AM
RE: Magic method __str__ - by ichabod801 - Dec-23-2018, 03:59 PM
|
Users browsing this thread: 2 Guest(s)