mjhea0 / python-ruby

Should I Learn Python or Ruby?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

same function different name

james4388 opened this issue · comments

I dont understand this

Although you can write this code in many ways, both of these methods are true to the language.
The Ruby code demonstrates the practice of having multiple names for the same function (fib and fibonacci are the same).

In Python you can def fibonaci then fib = fibonaci and both fib and fibonaci point in to same function

@james4388 Sure you can do aliasing in Python, but in my experience, it's seen as a bad practice. It's much more acceptable to Rubyists. Would you agree with that?