[Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)
Antoine Rozo
antoine.rozo at gmail.com
Sun May 14 07:33:32 EDT 2017
Also, how do you handle special methods for operators, such as __add__?
2017-05-14 13:18 GMT+02:00 Steven D'Aprano <steve at pearwood.info>:
> On Sun, May 14, 2017 at 11:12:21AM +0400, Abdur-Rahmaan Janhangeer wrote:
> > Whatever you all propose,
> >
> > coming from a java and c++ background, OOP in python is quite cumbersome.
>
> In what way it is cumbersome?
>
> > if you tell that i am not a python guy, then consider that current oop
> > style does not reflect python's style of ease and simplicity
>
> That is one opinion.
>
>
> > is __init__ really a good syntax choice?
>
> I don't understand the question. Are you complaining about the name
> "__init__"? Do you think it would be easier to write if it was spelled
> "init" or "new" or "Constructor"?
>
>
>
> --
> Steve
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
Antoine Rozo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170514/a9f3e297/attachment.html>
More information about the Python-ideas
mailing list