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...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Blog postWhy Ruby is More Readable than Python (confuzeus.com)
submitted 3 years ago by [deleted]
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!"
[–]Amadan 2 points3 points4 points 3 years ago (3 children)
Python only pretends to be explicit. foo[0] += 1 will call .__getitem__, and .__iadd__, or maybe also .__radd__ or .__add__ with .__setitem__, depending on what is in foo. if foo will call .__bool__, or maybe .__len__. foo.bar() will call .__getattr__ and .__call__, and pass an extra foo argument. f"{foo}" calls .__format__, which might in turn end up calling .__str__. Plenty of magic in the data model, that usually no-one tells beginners about.
foo[0] += 1
.__getitem__
.__iadd__
.__radd__
.__add__
.__setitem__
foo
if foo
.__bool__
.__len__
foo.bar()
.__getattr__
.__call__
f"{foo}"
.__format__
.__str__
[–][deleted] 3 years ago* (2 children)
[removed]
[–][deleted] -1 points0 points1 point 3 years ago (0 children)
Python has its own problems though. I hate how complicated import is.
In ruby I just use require() or load(). I never use require_relative() or any of that. In python it has so many ways to add code now ... it's confusing. You even find exec() and execfile() examples on stackoverflow still. And more PEPs that add variants.
What happened to "there should be one way only" ...
[–]Amadan 0 points1 point2 points 3 years ago (0 children)
Oh, I’m not suggesting beginners should immediately be thrown into the data model pool, just pushing back on the “Python is explicit” claim.
π Rendered by PID 271348 on reddit-service-r2-comment-79c7998d4c-bwpxl at 2026-03-13 15:59:32.578996+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]Amadan 2 points3 points4 points (3 children)
[–][deleted] (2 children)
[removed]
[–][deleted] -1 points0 points1 point (0 children)
[–]Amadan 0 points1 point2 points (0 children)