Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, there's only one constructor for any given class. The body of a class is the constructor of a class, and that constructor is made available through a method called .new. It's sort of like...Python, and imagining that you get __init__ created for you automatically. It's just two ways of doing the same inner call.


Python omits the new() thing, didn't miss it yet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: