On 25/07/2022 12.47, Khairil Sitanggang wrote:
> Regarding your comment : "
> *However, usually object creation and initialization iscombined by allowing
> arguments to the initializer:*" , so which one of the two classes Node1,
> Node2 below is more common in practice? Option 2, I guess.
> Thanks,
On 2022-07-24 at 19:47:38 -0500,
Khairil Sitanggang wrote:
> Regarding [Peter Otten's] comment : "
> *However, usually object creation and initialization iscombined by allowing
> arguments to the initializer:*" , so which one of the two classes Node1,
> Node2 below is more common in practice? Opt
Regarding your comment : "
*However, usually object creation and initialization iscombined by allowing
arguments to the initializer:*" , so which one of the two classes Node1,
Node2 below is more common in practice? Option 2, I guess.
Thanks,
# option 1:
class Node1:
def __init__(self, a):
Peter:
Thanks for the explanation. It is clear and easy to understand for a
beginner like me. I highly appreciate it.
Regards,
-Irfan
On Sun, Jul 24, 2022 at 2:23 AM Peter Otten <__pete...@web.de> wrote:
> On 23/07/2022 06:28, Khairil Sitanggang wrote:
> > Hello Expert:
> >
> > I just started usi
Thank you.
On Sun, Jul 24, 2022 at 2:23 AM Peter Otten <__pete...@web.de> wrote:
> On 23/07/2022 06:28, Khairil Sitanggang wrote:
> > Hello Expert:
> >
> > I just started using python. Below is a simple code. I was trying to
> check
> > if, say, NO1 is not in the NODELIST[:].NO
> > How can I ach
On 23/07/2022 06:28, Khairil Sitanggang wrote:
Hello Expert:
I just started using python. Below is a simple code. I was trying to check
if, say, NO1 is not in the NODELIST[:].NO
How can I achieve this purpose?
Regards,
-Irfan
class Node:
def __init__(self):
self.NO = 0