laike9m / Python-Type-Challenges

Master Python typing (type hints) with interactive online exercises!
https://python-type-challenges.zeabur.app
MIT License
516 stars 32 forks source link

Add hints for most of the basic challenges & improved "basic-optional" #72

Closed piglei closed 11 months ago

piglei commented 11 months ago

For people who don't have much experience with type hinting, the basic challenges would be a great place to start, and a hint message can be really useful for them. So I added a hint message for most of the basic challenges.

When processing basic-optional, I found that the original code does not require the user to add | None or Optional hinting, foo(x: int= 0) is sufficient. So I modified the validation code to make sure the optional hinting must be used.

laike9m commented 11 months ago

Thanks a lot!