惡魔的骨灰
@Python14159
python學習 一天一集 感動自己 #歡迎同好一起加入學習
接續昨天的進度,協程的其他內容 2.greenlet:使用switch()手動切換 3.gevent:自動切換,使用spawn(), sleep(), join(), joinall() 4.monkey:補丁,使用monkey.patch_all() #第21天 #python #pythonlearning
進程:常用方法&屬性 今天還犯了超級基礎的錯誤,在調用父類id時忘了加上(),然後還一直以為是程序錯誤,我真是白學了這麼久🙂↕️ #第19天 #python #pythonlearning
迭代器協議&自定義迭代器類 自定義迭代器類包含自定義__iter__()&__next__(),不過因為+=1在return前面,導致輸出內容永遠跳過初始數值,不知道怎麼搞,然後我就寫了一個if self.num == 1 print(self.num) 最後則是複習昨天的兩個對象 #第15天 #Python #python学習
可迭代對象和迭代器對象,有__iter__()是的迭代對象,有__iter__()+__next__()是迭代器對象。 不過所以說我依然不太懂所以迭代器對象到底是什麼,就只是有一個next()方法又怎樣? #第14天 #python #pythonlearning
程式碼跟魔術一樣,好酷 今天比較晚才回家,學了可以省略關閉文件的with open,和圖片的讀取寫入,一堆二進制的編碼變成圖片真的好神奇! #第12天 #pythonlearning #python
tell()和seek(offset,whence) 因為w+模式是先寫後讀,但寫完之後文件指針在文件最後,讀取到空白,要把指針移到最前面才有辦法讀取剛寫進去的內容,用seek(0,0)可以把指針移到文件開頭,tell()則是可以回報指針位置 #第11天 #python #pythonlearning
United States Tendências
- 1. Friendly 63.9K posts
- 2. SNAP 749K posts
- 3. Grokipedia 7,540 posts
- 4. Mac McClung 1,715 posts
- 5. #ChiefsKingdom 2,990 posts
- 6. Big Dom 2,024 posts
- 7. Riley Gaines 38.8K posts
- 8. #jeopardyblindguess N/A
- 9. James Wiseman N/A
- 10. #JUNGKOOKXCALVINKLEIN 66K posts
- 11. Jamaica 120K posts
- 12. Runza N/A
- 13. Monday Night Football 7,691 posts
- 14. Jessica 28.6K posts
- 15. Brad Paisley N/A
- 16. #OTGala6 172K posts
- 17. #boolivia N/A
- 18. Game 3 62.6K posts
- 19. Cher 17.5K posts
- 20. Hofer 1,689 posts
Something went wrong.
Something went wrong.