![]() At the time python and the zen of python were written, perl was a leader in scripting languages, and pythonistas had to give arguments as to why their language was better. So perhaps when Tim Peters wrote the zen of python, he mainly targetted python developers and this was a guidance rule for python, to offer only the best way to do each thing.Ĥ) As everybody knows, this was also a response to perl's TIMTOWTDI, which looks appealing to the beginning perl programmer, but rapidly leads to indecipherable code. Depending on the developer background and the. When you print, it will print out the encoded Zen of Python. However, the source code of this easter egg goes out of its way to violate many (if not all) of these principles. this.s gives you access to that encoded string. The Zen of Python is supposedly, by its literal description, the 'guiding principles' from Guido himself. However, the Zen of Python is not stored as a string in the module, it's actually encoded. ![]() Offering only one way to do things makes a much simpler interface. Like in any other discipline, building software is in many cases, a matter of tastes. In the Python interactive interpreter or a Python script, if you type, it will automatically print the Zen of Python. The Zen of Python is a collection of 19 guiding principles that influence the design of Python. There ARE several ways to do things, so the motto must be understood as an unreachable ideal.ģ) Perhaps, this applies best to writers of APIs or UIs. Kateryna Koidan python Have you heard about the Zen of Python These are the guiding principles that every Python programmer should know they are as concise and beautiful as Python itself. Special cases arent special enough to break the rules. Everybody agrees on the unique possible solution.Ģ) Obviously (and hopefully) this is not so in real life. zen of python input import this output The Zen of Python, by Tim Peters Beautiful is better than ugly. Here are a few hintsġ) If there is only one (preferably obvious) way to do things, this reduces considerably the design part of writing software. I think this motto should not be understood too strictly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |