wolfhong / magicmethods

Guide to Python's magic methods

Home Page:http://www.rafekettler.com/magicmethods.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Before All

原项目是我看过的介绍Python Magic Method 最好的文章. 我很希望有更多的人来学习python, 了解python.

我将该文章翻译成了中文,放在了我的博客上

此外, 对于我在阅读英语原文过程中感到生涩难懂的部分, 或者作者没有提及的部分,我写了一些例子来说明解释.

由于有自己对于学习的考量,翻译过程中,我将一些章节的顺序进行了修改,将常见的魔术方法放在前面介绍.

希望对你的python学习会有帮助^^

A guide to Python's magic methods

Written by Rafe Kettler in the year 2011.

Licensed under Creative Commons CC--NC-BY-SA (see http://creativecommons.org/licenses/by-nc-sa/3.0/). Basically, noncommercial, requires attribution, must be reproduced with a similar license. 'Nuff said.

Can be seen at http://www.rafekettler.com/magicmethods.html in relatively up to date form.

For forkers:

Edit magicmethods.markdown/magicmethods.tex, then run make docs. The build script requires the Python Markdown module, so you'll have to run pip install markdown if you don't already have it. Happy hacking!

About

Guide to Python's magic methods

http://www.rafekettler.com/magicmethods.html


Languages

Language:HTML 47.8%Language:TeX 36.6%Language:Python 10.8%Language:CSS 4.6%Language:Makefile 0.3%