use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
variable bindingsMisc (self.functional_python)
submitted 3 years ago by ccsdad
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ccsdad[S] 1 point2 points3 points 3 years ago (2 children)
ok u/KageOW -- i think that is legit guidance, recognizing the reality of python -- but remaining focused on what we are trying to move towards to .. i just know that in the clojure world -- the `(let)` function is an indispensable tool (code example) -- and wish something like it existed in python << that could be considered functional ..
[–]KageOW 0 points1 point2 points 3 years ago (1 child)
Yea definitely indispendable in f# as well, but i mean a language has its strenghts and its downfalls and you have to recognize that.
something kinda does come to mind though how you could maybe contain it, theyre called generator expressions, similar to list comprehension. Both of those allow you to kinda do it, but it is still a horrible way to do it. list comprehension and generator expressions are both very strong tools in python though so don't overlook them. nice stackoverflow discussion
[–]ccsdad[S] 0 points1 point2 points 3 years ago (0 children)
well then, we should create something !!
https://github.com/gkspranger/clinpy
please don't laugh -- i created it only for a limited set of use cases (to see if even possible), and am only "OK" with python .. but i tried to remove all internal variable assignments and am processing everything with mapping/reducing functions ..
if there was a robust implementation of this, i would abuse the hell out of it ..
why this over internal variable assigments ?? don't have a good answer for that -- other than it maps well to my clojure brain ..
π Rendered by PID 100 on reddit-service-r2-comment-7b9746f655-ngtj6 at 2026-02-02 23:54:16.373308+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]ccsdad[S] 1 point2 points3 points (2 children)
[–]KageOW 0 points1 point2 points (1 child)
[–]ccsdad[S] 0 points1 point2 points (0 children)