Most functions should accept keyword arguments #808
Comments
|
Looking at it, it should just require changes from |
|
Changes for the draw module to accept keyword arguments is being done via #896. |
|
See |
|
Having a look at this, now I have pygame mostly building on windows. master...MyreMylar:event-keyword-args So the eventual syntax here would be:
it seems to work, though it is a bit of a trivial case. Was a bit unsure about specifying the 'type' of the 'type' parameter as int. I mean it is an int but most people interact with the events system through the defined constants - but that is consistent with what was added by @charlesej . If what I've done seems OK I can go through the rest of the event module. Not sure how/if we can handle the functions with two overlapping signatures like:
But there are definitely a couple of others that could have keyword arguments added. |
|
I didn't really get very far with this one, I kept getting distracted by other things and was unable to think of neat solutions to map some c functions to python signatures. In the end my main interest was getting better auto-complete and linting support, which seems to have been largely solved by the .pyi files. So, I'll let it go and see if anyone else has more interest in closing it off in the future. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Some modules to start with:
How?
The text was updated successfully, but these errors were encountered: