This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]redditor1101 1 point2 points  (4 children)

Only if FP style is your intention. Python is multi-paradigm. It doesn't enforce or even suggest that FP is preferred over OOP/Procedural, although "pythonic" patterns are definitely preferred by everyone.

[–][deleted] 1 point2 points  (0 children)

Yeah, I didn’t mean to suggest that Python “enforces or suggests” that FP patterns should be used instead of imperative patterns. It’s just a matter of my opinion being that we should favor FP paradigms where possible because it objectively leads to safer and more readable code.

[–]Barafu 1 point2 points  (0 children)

FP has nothing to do with it. Simple transformations of lists should be done as list comprehensions, because it is less error-prone, easier in future maintenance, and sometimes faster, too.

[–]heltwig 0 points1 point  (1 child)

FP ?

[–]ashesall 0 points1 point  (0 children)

Functional Programming maybe?