About 83 results
Open links in new tab
  1. oop - What do __init__ and self do in Python? - Stack Overflow

    Jul 8, 2017 · init self may make sense for other methods, but what about init? When we call init, we're in the process of creating an object, so how can there already be a self? Python allows us to extend the …

  2. What does init mean in c# 9? - Stack Overflow

    Jun 6, 2020 · The init accessor makes immutable objects more flexible by allowing the caller to mutate the members during the act of construction. That means the object's immutable properties can …

  3. Duda con clases. ¿Para que sirve __init__? - Stack Overflow en español

    Aug 30, 2017 · Estoy empezando en esto de programar y me estoy metiendo en la POO. En python, ¿Porqué en las clases se pone __init__?. Y esto, a lo mejor puede sonar estúpido, pero ¿Por qué …

  4. Python中 __init__的通俗解释是什么? - 知乎

    题主Python小白一枚,而且没有编程背景,正在自学机器学习。目前努力尝试把各种机器学习算法用python来实…

  5. What exactly does init do? - Unix & Linux Stack Exchange

    Apr 20, 2015 · init can do whatever you want init is an arbitrary executable called by the Linux kernel at the end of the boot process (and the only one such executable). It is normally implemented as an …

  6. What does __init mean in the Linux kernel code? - Stack Overflow

    These are only macros to locate some parts of the linux code into special areas in the final executing binary. __init, for example (or better the __attribute__ ((__section__ (".init.text"))) this macro expands …

  7. python - What is __init__.py for? - Stack Overflow

    Make a directory called 'datetime' and in it make two blank files, the init.py file (with underscores) and datetime.py. Now open an interpreter, import sys, and issue sys.path.insert(0, '/path/to/datetime'), …

  8. Why do we use __init__ in Python classes? - Stack Overflow

    I am having trouble understanding the Initialization of classes. What's the point of them and how do we know what to include in them? Does writing in classes require a different type of thinking v...

  9. python - __init__ as a constructor? - Stack Overflow

    It's tempting, because it looks like a constructor (by convention, __init__ is the first method defined for the class), acts like one (it's the first piece of code executed in a newly created instance of the class), …

  10. python中self与__init__怎么解释能让小白弄懂? - 知乎

    一个学生,考试100分 一个学生,考试20分 他们都是,在init里面赋值的,而且是赋值给self,就是这个实例 然后,想查看他们成绩,在调用一个成绩方法,打印出来的时候,就是他们各自,自己的成绩, …