Evil Python Tips
@EvilPythonTips
Parody account run by @mgedmin
Inscrit en Février 2014
Vous pourriez aimer
Evil Python Tips a reposté
# 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 Tendances
- 1. Colts 32K posts
- 2. Philip Rivers 13.9K posts
- 3. #WWERaw 19.1K posts
- 4. Purdy 12.8K posts
- 5. Kittle 6,811 posts
- 6. #FTTB 4,641 posts
- 7. Niners 6,150 posts
- 8. Alec Pierce 3,237 posts
- 9. Jennings 14.7K posts
- 10. #SFvsIND 1,600 posts
- 11. #ForTheShoe 1,936 posts
- 12. Adam the Woo 1,080 posts
- 13. #WLRDeluxe 24.7K posts
- 14. Tyler Warren 1,974 posts
- 15. Pelicans 3,564 posts
- 16. Kansas 32.3K posts
- 17. Missouri 15.1K posts
- 18. Uncle Phil N/A
- 19. CJ West N/A
- 20. Mizzou 1,895 posts
Vous pourriez aimer
Loading...
Something went wrong.
Something went wrong.