gilch / hissp

It's Python with a Lissp.
https://gitter.im/hissp-lang/community
Apache License 2.0
369 stars 9 forks source link

`deftype` should be able to take `kwds` #194

Closed gilch closed 1 year ago

gilch commented 1 year ago

Most classes won't care, but sometimes it's needed for the metaclass machinery. The underlying type() builtin didn't accept those until Python 3.8. I'm pretty sure I wrote deftype before that, but it seems incomplete now. Somehow, I must have missed it in the "What's new in Python" changelog.

This will go in the bases tuple, obviously. That's where the equivalent goes in the class statement. I think I'll just parse everything after a : as kwds pairs. Similar to attach, so it won't support the :? placeholders for bases after the :.