Python self-study
🐍Python falsafasi:
Python tilini ishlab chiquvchilar "Zen of Python" deb nomlangan o'ziga xos dasturiy falsafaga amal qilishadi. Uning matni Python interpretatorga ushbu buyruqni import qilish orqali beriladi (har seansda bir marta ishlaydi).
import this
Ushbu falsafaning muallifi Tim Peters.
Ingliz tilida:
Beautiful is better than ugly;
Explicit is better than implicit;
Simple is better than complex;
Complex is better than complicated;
Flat is better than nested;
Sparse is better than dense;
Readability counts;
Special cases aren't special enough to break the rules;
Although practicality beats purity;
Errors should never pass silently;
Unless explicitly silenced;
In the face of ambiguity, refuse the temptation to guess;
There should be one — and preferably only one — obvious way to do it;
Although that way may not be obvious at first unless you're Dutch;
Now is better than never;
Although never is often better than *right* now;
If the implementation is hard to explain, it's a bad idea;
If the implementation is easy to explain, it may be a good idea;
Namespaces are one honking great idea — let's do more of those!
Oʻzbek tilida:
Chiroyli xunukdan yaxshiroqdir;
Yashirindan oshkora yaxshiroq;
Oddiy murakkabdan yaxshiroqdir;
Murakkab murakkabdan yaxshiroq;
Yassi uyadan yaxshiroqdir;
Kamroq zichroqdan yaxshiroqdir;
O'qish qobiliyatini hisoblash;
Maxsus holatlar qoidalarni buzish uchun etarli emas;
Garchi amaliylik poklikni mag'lub etsa ham;
Xatolar hech qachon jimgina o'tmasligi kerak;
Faqat aniq jim bo'lmaganda;
Noma'lumlik oldida taxmin qilish vasvasasidan bosh torting;
Buni amalga oshirishning bitta - va tarjixon bitta - aniq usuli bo'lishi kerak;
Agar siz gollandiyalik bo'lmasangiz, avvalo bu narsa aniq bo'lmasligi mumkin;
Endi hech qachon bo'lmaganidan yaxshiroq;
Garchi hech qachon hozirda * hozirdan * yaxshiroq emas;
Agar amalga oshirishni tushuntirish qiyin bo'lsa, bu yomon fikr;
Agar amalga oshirishni tushuntirish oson bo'lsa, yaxshi fikr bo'lishi mumkin;
Ism maydonlari - bu juda yaxshi g'oya - keling, bundan ham ko'proq narsani qilamiz!
@python_self
1 · 393 ·