Re: [Python-ideas] [semi-OT] NamedTuple from aenum library [was: JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)]

2017-05-17 Thread Ethan Furman
On 05/17/2017 02:06 PM, Ethan Furman wrote: You might want to check out the NamedTuple class from my aenum [1] library [1] https://pypi.python.org/pypi/aenum -- ~Ethan~ ___ Python-ideas mailing list Python-ideas@python.org

[Python-ideas] [semi-OT] NamedTuple from aenum library [was: JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)]

2017-05-17 Thread Ethan Furman
On 05/17/2017 10:43 AM, Ivan Levkivskyi wrote: On 17 May 2017 at 19:40, Juancarlo AƱez wrote: On Wed, May 17, 2017 at 12:48 PM, Ivan Levkivskyi wrote: class Foo(NamedTuple): """Foo is a very important class and you should totally use it. """ bar: int baz: int = 0