Evil Python Tips
@EvilPythonTips
Parody account run by @mgedmin
เข้าร่วมเมื่อ กุมภาพันธ์ 2014
คุณอาจชื่นชอบ
Evil Python Tips รีโพสต์แล้ว
# Sometimes braces work in Python 3 # (don't actually do this) if (True):{ print("do a thing") } else:{ print("do another thing") }
3
9
15
0
0
assert (condition, message) lets you wrap the assertion over two lines without using those ugly backslashes!
1
3
0
1
0
Have your custom __repr__ return an empty string sometimes. AssertionError: [] != [] will keep developers on their toes!
0
0
0
0
0
self.globs = self.__dict__ lets you re-use a doctest setUp() function in a unittest.TestCase.
0
0
0
0
0
Always use 'from foo import *'. Saves typing.
0
0
0
0
0
United States เทรนด์
- 1. #WWENXT 12.1K posts
- 2. Knicks 25.1K posts
- 3. Blake 19.5K posts
- 4. Thea 10.4K posts
- 5. #NBACup 2,803 posts
- 6. Queen Naija N/A
- 7. Wemby 16.4K posts
- 8. Brunson 10.8K posts
- 9. Vanity Fair 97K posts
- 10. Stephon Castle 1,573 posts
- 11. #LGRW 1,294 posts
- 12. Joseph 49.7K posts
- 13. #RHAPMafia N/A
- 14. OG Anunoby N/A
- 15. #NewYorkForever 1,758 posts
- 16. Susie Wiles 180K posts
- 17. Canelo 3,907 posts
- 18. Adam Silver 1,610 posts
- 19. Mustapha Kharbouch 72.6K posts
- 20. Terence Crawford 20.7K posts
คุณอาจชื่นชอบ
Loading...
Something went wrong.
Something went wrong.