Ruby vs. Python

Notes from my point of view after working with Ruby for 5 years (almost with Rails) and Python 7 months (CLI tools typically). I understand, that some people might have different view;-)

Python works with some objects, but it is not object oriented language (e.g. there is no encapsulation on objects, function body can be taken out from object, etc ). py-1

Python's not [] is True (empty array is false) is strange, usage of object's internal methods (like _iteritem etc.) makes it dirty to me. py-1

True (with capitol T instead of t) in Python makes it more meaningful to me. It is not a reserved word looking like a dirty local variable;-) py+1

Python allows assign value to True/False, I don't understand why and Ruby does not do that. py-1

Python 2.7.9 (default, Feb 19 2015, 11:42:06)
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> True = False
>>> True == False

Strange syntax tricks makes python more ugly to me (e.g. [ for x in list]). It does not match with the rest of syntax IMO. py-1

Ruby syntax is more consistent (not much special constructs) and if there are some, it can be used on more than one place. rb+1

If you create own class, in python it is not “geniune” in python, but subclass of UserType. py-1

Python's import is more flexible than Ruby source code fragments loading with require. rb-1 Pip is more mature tool than gem is. py+1

Python's syntax with colons and enforcing intendations are more comfortable for me, than Ruby's do..end. py+1

I can write same function shorter in Ruby, than in Python usually. rb+1

Python is more stable and has better backward compatibility, than Ruby has. rb-1

#python #ruby