Skip to content

Commit

Permalink
add python dir
Browse files Browse the repository at this point in the history
  • Loading branch information
zouchengxi committed Jun 6, 2024
1 parent 7f1322e commit 646b4f0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion blog/source/_posts/subposts_python/### Python.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ class Fruit():
```

两种方式达到的效果,都是当使用`.`操作符访问属性时,调用描述符协议类中的`__get__`等方法,而不是原始的字典lookup方法。同时,描述符协议类中的`__get__`方法等可自定义,相当于提供了一种自定义通过`.`操作符去访问类属性的能力。例如,通过自定义`__set__`方法,可以实现对属性赋值时的参数合理性检查。
完结撒花。

##### 参考:

Expand Down

0 comments on commit 646b4f0

Please sign in to comment.