5 ms·
Hi, maintainer of the repo here, thanks for sharing :) If anyone's willing to go through those examples with an interpreter on the side, you can check out http
by satwik 4y ago
Hi, maintainer of the repo here, thanks for sharing :)
If anyone's willing to go through those examples with an interpreter on the side, you can check out https://www.wtfpython.xyz/ https://www.wtfpython.xyz/
It's built with pyiodide, the only limitation is you may not get correct results for the examples that are version-dependent. The UX might not be great, especially on mobile (happy to hear ideas on how to improve it), but it does the job for now :)
- albert_e 4y agoLooks great but one quibble -- the "dark mode" simply flips the black and white of normal webpage and code blocks ... which is 50-50 can we use a different shade of grey for code blocks in dark mode?
- satwik 4y agoRight, I agree with this. Reducing some contrast by using shades of grey will look more pleasant. I'll get this adjusted, thanks for the tip!
- Beltiras 4y agoThank you for this. Even as a senior Python developer I didn't know many of these.
- satwik 4y agoGlad you found it informative. I've found senior developers to have polarized opinions about the usefulness of the collection, so always good to see a review in favorable direction :)
- Beltiras 4y agoEdge cases can keep me awake at night. Reminding oneself that there are no simple things in this enterprise of ours is a good reminder.
- Fiahil 4y ago> in favorable direction Speaking of directions, how about the bidirectional use of `yield` and `yield from` ? https://stackoverflow.com/questions/9708902/in-practice-what-are-the-main-uses-for-the-yield-from-syntax-in-python-3-3 https://stackoverflow.com/questions/9708902/in-practice-what... # Sending data to a generator (coroutine) using yield from - Part 1
- isoprophlex 4y agoThis is beautiful! I've been known to hate on stuff like that walrus operator being added, but this I love. So clean, simple and powerful. Thanks for sharing.
- tetha 4y agoI also learned a bunch of weird things about python from this, like the really gritty details of assignments and such. It's surprisingly messy once you leave the beaten good path. I also learned that there is python code which causes a rather violent "Don't you ever get that near a code base I maintain"-reaction, which I much rather associated with perl.
- deleted 4y ago[deleted]