[issue33190] problem with ABCMeta.__prepare__ when called after types.new_class

2018-03-30 Thread Rick Teachey
Rick Teachey added the comment: Thank you; I gave it a go. Hopefully didn't cause too much additional work for someone. -- ___ Python tracker

[issue33190] problem with ABCMeta.__prepare__ when called after types.new_class

2018-03-30 Thread Rick Teachey
Change by Rick Teachey : -- keywords: +patch pull_requests: +6033 stage: -> patch review ___ Python tracker ___

[issue33190] problem with ABCMeta.__prepare__ when called after types.new_class

2018-03-30 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: https://devguide.python.org/ will help you. -- ___ Python tracker ___

[issue33190] problem with ABCMeta.__prepare__ when called after types.new_class

2018-03-30 Thread Rick Teachey
Rick Teachey added the comment: Excellent; thank you very much for the explanation. I have never done a PR on a project this size but I'll give it a try. -- ___ Python tracker

[issue33190] problem with ABCMeta.__prepare__ when called after types.new_class

2018-03-30 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is not a bug, but a misunderstanding: * First, ABCMeta doesn't have `__prepare__`, it is just `type.__prepare__` * Second, the third argument to `types.new_class` is called `kwds` for a reason. It is not a namespace like in `type`

[issue33190] problem with ABCMeta.__prepare__ when called after types.new_class

2018-03-30 Thread Rick Teachey
New submission from Rick Teachey : I am pretty sure this is a bug. If not I apologize. Say I want to dynamically create a new `C` class, with base class `MyABC` (and dynamically assigned abstract method `m`). This works fine if I use `type`, but if I use `new_class`, the