GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Paarth :verified: (paarth@mastodon.pirate.lgbt)'s status on Saturday, 24-Feb-2024 17:33:56 JSTPaarth :verified:Paarth :verified:
    in reply to
    • Ivan Sagalaev :flag_wbw:

    @isagalaev you don't need another library! From the docs for lru_cache: https://docs.python.org/3/library/functools.html#functools.lru_cache

    > The original underlying function is accessible through the __wrapped__ attribute. This is useful for introspection, for bypassing the cache

    So you can easily do something along the lines of:

    try:
    cached_func.__wrapped__(*args)
    except SomeSpecificError:
    cached_func(*args)

    In conversationabout a year ago from mastodon.pirate.lgbtpermalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: docs.python.org
      functools — Higher-order functions and operations on callable objects
      from ../about.html
      Source code: Lib/functools.py The functools module is for higher-order functions: functions that act on or return other functions. In general, any callable object can be treated as a function for t...
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.