▲ | pansa2 a day ago | |
> python/ruby/etc never denied that the procedural world existed Interestingly, those two languages use very different mechanisms for top-level functions - although I’m not sure if there’s a significant difference in practice. Python has true standalone functions, whereas in Ruby’s they’re really methods of a `main` object. | ||
▲ | 1718627440 a day ago | parent [-] | |
In python you are recommended to use
and not put any code that is executed at the top-level. Otherwise its also executed when you import the file. |