
文章 · Posts
星图与尘埃的全部文章:技术实践、Hugo 建站、自媒体与生活成长。
129 篇文章
·
持续更新中




Python基础 类
·1463 字·3 分钟
一:概念阐述 # 面向对象 # 因为提高了代码的复用性,开发效率高,而且便于扩展迭代,所以成为了主流的开发思想。其中的核心概念就是类,在面向对象的思想中,可以用类来抽象一切的事物

Python基础 虚拟环境管理 Anaconda
·1460 字·3 分钟
python虚拟环境的必要性 # 背景:在我们实际开发的python项目,因为常常依赖第三方库,并且第三方库之间的版本也需要相互兼容,程序才可以正常执行。

Python基础 编程章法2
·787 字·2 分钟
今天继续分享一下自己的近期心得:
python之禅 # Python 3.10.11 | packaged by Anaconda, Inc. | (main, Apr 20 2023, 18:56:50) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import this The Zen of Python, by Tim Peters 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! >>> 其中有两句很有启发: