pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
853 stars 140 forks source link

Code tabs in docs; one for untyped python, the other tab for typed python(3420) #1688

Open GalacticEmperor1 opened 1 year ago

GalacticEmperor1 commented 1 year ago

Issue №3420 opened by illume at 2022-08-21 10:44:49

There's an extesion here: https://sphinx-tabs.readthedocs.io/en/latest/# code-tabs (scroll to bottom of page to see demos)

Would allow us to show examples in one tab with python, and the other with typed python.

Because types are confusing, but also useful to some folks.


Comments

*novialriptide commented at 2022-09-07 17:59:11*

Are you proposing that this would be added to the examples as well? I'm not sure where this would be used.

MyreMylar commented 4 months ago

I feel like this would only really be useful (as in; added typehints would enhance things like autocomplete) in longer code chunks, but perhaps I'm wrong.

Is anyone adding typehints to their little pygame snippets?