[Q] __init__ in class

2019-12-26 Thread 황병희
in making class, why we should set "__init__"? so non-init class is useless? actually i did fail to understand __init__'s meaning. what is role of __init__ in class. sincerely, from python beginner. -- ^고맙습니다 _地平天成_ 감사합니다_^))// -- https://mail.python.org/mailman/listinfo/python-list

Re: [Q] __init__ in class

2019-12-26 Thread DL Neil via Python-list
On 27/12/19 12:11 AM, 황병희 wrote: in making class, why we should set "__init__"? so non-init class is useless? actually i did fail to understand __init__'s meaning. what is role of __init__ in class. sincerely, from python beginner. Please be aware that there is a Python Tutor Discussion List.

Re: [Q] __init__ in class

2019-12-26 Thread Irv Kalb
> On Dec 26, 2019, at 3:11 AM, 황병희 wrote: > > in making class, why we should set "__init__"? so non-init class is > useless? actually i did fail to understand __init__'s meaning. what is > role of __init__ in class. > > sincerely, from python beginner. > > -- > ^고맙습니다 _地平天成_ 감사합니다_^))// > --

Re: [Q] __init__ in class

2019-12-26 Thread DL Neil via Python-list
On 27/12/19 10:58 AM, Irv Kalb wrote: On Dec 26, 2019, at 3:11 AM, 황병희 wrote: in making class, why we should set "__init__"? so non-init class is useless? actually i did fail to understand __init__'s meaning. what is role of __init__ in class. ... As an example, let's say that you create a p

Re: [Q] __init__ in class

2019-12-26 Thread 황병희
Hellow Stefan^^^ > The class definition depends on the requirement > specification for the class. > > 클래스 정의는 클래스의 요구 사항 스펙에 따라 다릅니다. Now i got it, understood, thanks a lot^^^ Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// -- https://mail.python.org/mailman/listinfo/python-list

Re: [Q] __init__ in class

2019-12-26 Thread 황병희
Hellow DL^^^ > Please be aware that there is a Python Tutor Discussion List. Thanks for advice^^^ Sincerely, -- ^고맙습니다 _地平天成_ 감사합니다_^))// -- https://mail.python.org/mailman/listinfo/python-list

Re: [Q] __init__ in class

2019-12-26 Thread 황병희
Irv Kalb writes: > myObject = MyClass() # "MyClass" would be the name of a class in your code > > When you run a line like the one above, Python looks to see if that > class has a method named __init__(). If it does, then Python calls > that method of the newly created object. Very clean com