About 5,910,000 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 …

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

    Jan 15, 2009 · 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 …

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

    Dec 23, 2011 · 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 …

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

    The __init macro causes the init function to be discarded and its memory freed once the init function finishes for built-in drivers, but not loadable modules. If you think about when the init …

  5. How to return a value from __init__ in Python? - Stack Overflow

    Mar 22, 2010 · I have a class with an __init__ function. How can I return an integer value from this function when an object is created? I wrote a program, where __init__ does command line …

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

    Apr 20, 2015 · System 5 init will tell you only a small part of the story. There's a sort of myopia that affects the Linux world. People think that they use a thing called "System 5 init ", and that …

  7. Duda con clases. ¿Para que sirve __init__? - Stack Overflow en …

    Aug 30, 2017 · Porque es lo que he definido en la clase vehiculo usando la funcion __init__ Es decir que los objetos se __init__cializarán (se crearán) con esos parámetros.

  8. How to overload __init__ method based on argument type?

    There's no need for all that code in init -- I shortened it down to just a type conversion, which does the same thing and is more flexible.

  9. python - Should __init__ () call the parent class's __init__ ...

    In old-style classes, you could only call the super init if the super class actually had an init defined (which it often doesn't). Therefore, people typically think about calling super method, rather …

  10. 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 …

Refresh