r/Python • u/bumblechuckle • Oct 28 '14
Hello, please post your offbeat/oddball/absurd open source python repos.
Searching github isn't bring up much and I'm sure there must be some interesting ones. Thanks!
1
u/astronouth7303 Oct 29 '14
More "cool python tricks" than actually funny, but it amuses me.
I always get a kick out of something I figured out for aioevents. See, the purpose of the function is to call each event handler in turn and return its result. BUT, short circuiting behavior also works. If you wrap it in all(), it stops on the first falsey value, and if you wrap it in any(), it stops on the first truthy value.
These kinds of behaviors are incredibly useful for plugin events (cancel an action, get a value from various plugins, etc). And I get them for free just by using a generator.
-3
u/karmarauder Oct 28 '14
So you've been a redditor for about an hour, having registered Tue Oct 28 16:21:52 2014 UTC and posting this Tue Oct 28 16:30:31 2014 UTC, only to ask something that is explained in the sidebar. I call bullshit.
-1
u/bumblechuckle Oct 28 '14
I hadn't seen the cool github projects filtered by Python, but thanks for aggressively pointing that out.
3
u/Asdayasman Oct 28 '14
If you are about to ask a question, please consider r/learnpython
3
u/xiongchiamiov Site Reliability Engineer Oct 29 '14
To be fair, this is the sort of thing I'd agree is more suited for /r/Python. It's not about learning Python.
2
u/karmarauder Oct 29 '14
To be fair, this is the sort of thing I'd agree is more suited for /r/Python. It's not about learning Python.
I agree, but recent threads like these make me wonder if this isn't just a troll. I could be wrong but there have been several new accounts asking dubious questions only to disappear afterwards.
2
u/Asdayasman Oct 29 '14
/r/learnpython is cursed with its name. It's a place for Python questions, which, more often than not, are about learning it, but that's not exclusively what it's for.
3
u/xiongchiamiov Site Reliability Engineer Oct 28 '14
Neither of these is written in python, but they are my two primarily-for-amusement repos:
https://github.com/xiongchiamiov/terminal-screensaver
https://github.com/xiongchiamiov/git-pray
And some people might include https://github.com/xiongchiamiov/git-swear-stats in that category as well, although I think it's a useful culture-analysis tool.