[Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

Nick Coghlan ncoghlan at gmail.com
Mon May 15 07:05:29 EDT 2017

On 14 May 2017 at 17:12, Abdur-Rahmaan Janhangeer <arj.python at gmail.com> wrote:
> Whatever you all propose,
> coming from a java and c++ background, OOP in python is quite 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
> is __init__ really a good syntax choice?

That's a different question, and one with a well-structured third
party solution: https://attrs.readthedocs.io/en/stable/

See https://mail.python.org/pipermail/python-ideas/2017-April/045514.html
for some ideas on how something like attrs might be adapted to provide
better standard library tooling for more concise and readable class


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list