https://docs.python.org/3/reference/data...t.__repr__ Wrote:object.__repr__(self)
Called by the repr() built-in function to compute the “official” string representation of an object. If at all possible, this should look like a valid Python expression that could be used to recreate an object with the same value (given an appropriate environment). If this is not possible, a string of the form <...some useful description...> should be returned. The return value must be a string object. If a class defines __repr__() but not __str__(), then __repr__() is also used when an “informal” string representation of instances of that class is required.
This is typically used for debugging, so it is important that the representation is information-rich and unambiguous.
ABC Module and @property decorator, Pythonic Way?
ABC Module and @property decorator, Pythonic Way?
|
(Aug-18-2021, 05:16 PM)deanhystad Wrote: Software development. Mostly machine controls. Python is new to me, but it is in demand and I need to adapt. I hear that. I see a lot of coders that their only regret was not learning Python first. That's when I said, "I need to learn this." I am learning Python to get into a career coding python or just using it as a tool for other entrepreneurial projects. I need to brush up on SQL, CSS, HTML5 as well. I am very well versed in regex. I was out of the game for 15 years do to some health issues. I am on disability and have all the time I need to learn and re-learn all the things that are lost to me. I was an affiliate marketer/web developer for many years. How long have you been learning Python? Here is a video of Raymond Hetinger encouraging the use of the ABC abstract module. Who is he anyway? |
|
Users browsing this thread: 3 Guest(s)