<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 28, 2019 at 10:53 AM Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">28.03.19 19:45, Brett Cannon пише:<br>
> So I would say that a cache-clearing function convention would be a <br>
> reasonable starting point. If that turns out to not be enough for folks <br>
> we can talk about expanding it, but I think we should start small and <br>
> grow from there as needed.<br>
> <br>
> So what name would people want. clear_cache() or _clear_cache()? I <br>
> personally prefer the latter since clearing the cache shouldn't be <br>
> something people should typically need to do and thus the function is an <br>
> implementation detail.<br>
<br>
This is an interesting idea. I think it should be a dunder name: <br>
__clearcache__() or __clear_cache__().<br></blockquote><div><br></div><div>Between those two then I would go with __clearcache__(), but I was talking about a naming scheme for a function in each module, not a new built-in in case you thought I meant that.<br></div><div> </div><div>-Brett<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The disadvantage is that this method is slower in the case of large <br>
number of imported modules.<br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div>