tgoop.com/pythonlearnme/263
Create:
Last Update:
Last Update:
کات کلیدی و مفید Zen of python از تیم پیترز برای برنامه نویسی بهینه و عالی
در زیر تعدادی از نکات رو بصورت فارسی گفتم ولی بهتره عناوینی که به انگلیسی هستن رو بخوانید و پیروی کنید.
pyfarsi@ubuntu:~$ python31. انتخاب یک عنوان مناسب برای هرجایی مثل کلاس ها , وریبل ها و توابع و...
>>> import this
2. زیبانویسی بهتر از زشت نوشتن کدها است با رعایت قواعد و پیشنهادات
3. سادگی بهتر از پیچیدگی است.
4. صریح بودن بهتر از تودرتو بودن است
5. پیچیدگی بهتر از پیچیده کردن است.
1. Beautiful is better than ugly.منبع: https://www.python.org/dev/peps/pep-0020/
2. Explicit is better than 3. implicit.
4. Simple is better than complex.
5. Complex is better than complicated.
6. Flat is better than nested.
8. Sparse is better than dense.
Readability counts.
9. Special cases aren't special enough to break the rules.
10. Although practicality beats purity.
11. Errors should never pass silently.
12. Unless explicitly silenced.
13. In the face of ambiguity, refuse the temptation to guess.
14. There should be one-- and preferably only one --obvious way to do it.
15. Although that way may not be obvious at first unless you're Dutch.
16. Now is better than never.
Although never is often better than *right* now.
17. If the implementation is hard to explain, it's a bad idea.
18. If the implementation is easy to explain, it may be a good idea.
19. Namespaces are one honking great idea -- let's do more of those!
BY 🧑💻PythonDev🧑💻

Share with your friend now:
tgoop.com/pythonlearnme/263