PYHINTS Telegram 106
Python Hints
ازونجایی که به جواب رسیدید مشکل اینه که lru_cache و cache (پایتون ۳.۹ به بعد) رو نباید روی method ها بزنید داکبومنت‌های مختلف هم بهش اشاره کردند. دلیلش هم که قبلا توی این پست گفتم : Post Link توی پست بعدی بیشتر توضیح میدم.
توی پستی که رفرنس دادم اگر نحوه صدا زدن تابع توسط decorator رو ندونید شاید یک مقدار سخت باشه اتصال این دوتا مطلب به هم دیگه

داخل کادر سبز کاری هست که واقعا lru_cache می‌کنه
مشکل اینه که حالا که میره توی global دیگه garbage collector روش اعمال نمی‌شه چون همواره رفرنس خواهد داشت

شاید بهتره توی این مثال
def __del__
رو هم بذارید و پرینت بزنید تا ببینید که اجرا نمی‌شه و این ینی garbage collector دست بهش نمیزنه

حالا راه حل چیه : (پست بعدی)
👍122



tgoop.com/pyHints/106
Create:
Last Update:

توی پستی که رفرنس دادم اگر نحوه صدا زدن تابع توسط decorator رو ندونید شاید یک مقدار سخت باشه اتصال این دوتا مطلب به هم دیگه

داخل کادر سبز کاری هست که واقعا lru_cache می‌کنه
مشکل اینه که حالا که میره توی global دیگه garbage collector روش اعمال نمی‌شه چون همواره رفرنس خواهد داشت

شاید بهتره توی این مثال

def __del__
رو هم بذارید و پرینت بزنید تا ببینید که اجرا نمی‌شه و این ینی garbage collector دست بهش نمیزنه

حالا راه حل چیه : (پست بعدی)

BY Python Hints





Share with your friend now:
tgoop.com/pyHints/106

View MORE
Open in Telegram


Telegram News

Date: |

Telegram has announced a number of measures aiming to tackle the spread of disinformation through its platform in Brazil. These features are part of an agreement between the platform and the country's authorities ahead of the elections in October. Joined by Telegram's representative in Brazil, Alan Campos, Perekopsky noted the platform was unable to cater to some of the TSE requests due to the company's operational setup. But Perekopsky added that these requests could be studied for future implementation. Commenting about the court's concerns about the spread of false information related to the elections, Minister Fachin noted Brazil is "facing circumstances that could put Brazil's democracy at risk." During the meeting, the information technology secretary at the TSE, Julio Valente, put forward a list of requests the court believes will disinformation. Image: Telegram. 4How to customize a Telegram channel?
from us


Telegram Python Hints
FROM American