Skip to content

Commit

Permalink
little fix: 代码里不能使用md语法
Browse files Browse the repository at this point in the history
  • Loading branch information
suqi committed Mar 1, 2016
1 parent 45bd701 commit 31b450e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Onelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
避免类初始化时大量重复的赋值语句
```python
class A(object):
def **init**(self, a, b, c, d, e, f):
self.**dict**.update({k: v for k, v in locals().items() if k != 'self'})
def __init__(self, a, b, c, d, e, f):
self.__dict__.update({k: v for k, v in locals().items() if k != 'self'})
```
更多的一行方法请参考[Python官方文档](https://wiki.python.org/moin/Powerful%20Python%20One-Liners)

Expand Down

0 comments on commit 31b450e

Please sign in to comment.