你可能會喜歡
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
United States 趨勢
- 1. #DareYouToDeathEP1 111K posts
- 2. Good Thursday 24.2K posts
- 3. #Survivor50 2,693 posts
- 4. Disturbed 6,679 posts
- 5. Cartoon Network 1,651 posts
- 6. Newt 2,418 posts
- 7. Garfunkel N/A
- 8. Warrior Dividend 31.1K posts
- 9. Davido 265K posts
- 10. Savannah 16K posts
- 11. #PresidentialAddress 15.3K posts
- 12. IT MATTERS 49.1K posts
- 13. Kristina 4,516 posts
- 14. Jake Allen N/A
- 15. #AEWDynamite 23.8K posts
- 16. #vampirenowtwt 15.4K posts
- 17. Sally Fields 1,481 posts
- 18. Billie Eilish 12.7K posts
- 19. Rizo 2,200 posts
- 20. jimmy fallon 5,503 posts
Loading...
Something went wrong.
Something went wrong.