News for hackers. Stuff that matters.
Re:Grumpy: Go running Python by trotterdylan on Wednesday January 04, 2017 @02:30PM (#13321293)
Heh, I came across the namedtuple exec thing the other day when I was trying to get the collections module working :\

namedtuple will have to be implemented differently. I think it can be accomplished by defining the class with type()? Maybe with a metaclass...

Re:Grumpy: Go running Python by pdonis on Wednesday January 04, 2017 @10:12PM (#13324395)
> I think it can be accomplished by defining the class with type()?

I've done it using more or less that method. The code is in the "coll" sub-package of my plib.stdlib project; the Python 2 version is here on bitbucket:

https://bitbucket.org/pdonis/plib-stdlib/src

Re:Grumpy: Go running Python by xapata on Wednesday January 04, 2017 @05:26PM (#13322687)
You won't get exact compatibility, but a metaclass implementation would give almost all the features. I can't remember what exactly you give up, but I did that once and I lost some introspection friendliness.
Re:Grumpy: Go running Python by xapata on Thursday January 05, 2017 @11:12AM (#13328274)
Nevermind, all you need is type(). Metaclass unnecessary.