Everything is an object in Python

本文主要想解决的问题是:在Python中什么是“一切皆对象”? 什么是对象? 在Python官方术语对照表中是这样定义的: Object: Any data with state (attributes or value) and defined behavior (methods). 什么是属性(attribute)和方法(method): Attribute: A value associated with an object which is usually referenced by name using dotted expressions. Method: A function which is defined inside a class body. If called as an attribute of an instance of that class, the method will get the instance object as its first argument (which is usually called self). 什么是函数(function)和类(class):...

Python 2048字

BOMB: Birth Of My Blog

用于记录我的博客的诞生 Step 0.1: 安装 Hugo 安装 Git: 用于和 GitHub 仓库的交互(如上传本地网页和下载主题或软件) brew install git Git is a distributed version control system. 安装 Go: 下载安装包安装即可 Go is a statically typed, compiled high-level programming language. 安装 Dart Sass: 有些主题(如TeXify3)的渲染需要用到 brew install sass/sass/sass Sass is a preprocessor scripting language that is interpreted or compiled into CSS. 完成之后会在 myblog 文件夹创建两个名为 node_modules 和 resources 的文件夹和两个 json 文件 遇到的报错: 问题参考这里,解决:先 rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" Error: Cannot find module 'autoprefixer',解决:需要先安装 node....

Hugo 989字

Infinitesmial Generator

0字