[Python-announce] python-oracledb 1.1.1

2022-09-28 Thread Anthony Tuininga
What is python-oracledb? python-oracledb is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. This module is intended to eventually replace cx_Oracle. Where do I get it?

Re: Implementation of an lru_cache() decorator that ignores the first argument

2022-09-28 Thread dn
On 29/09/2022 07.22, Robert Latest via Python-list wrote: ... > This is what I came up with. I'm quite happy with it so far. Question: Am I > being too clever? is it too complicated? Am I overlooking something that will > come back and bite me later? Thanks for any comments! Thank you for the

Re: Implementation of an lru_cache() decorator that ignores the first argument

2022-09-28 Thread Chris Angelico
On Thu, 29 Sept 2022 at 05:36, Robert Latest via Python-list wrote: > in a (Flask) web application I often find that many equal (SQLAlchemy) queries > are executed across subsequent requests. So I tried to cache the results of > those queries on the module level like this: > > @lru_cache() >

Implementation of an lru_cache() decorator that ignores the first argument

2022-09-28 Thread Robert Latest via Python-list
Hi all, in a (Flask) web application I often find that many equal (SQLAlchemy) queries are executed across subsequent requests. So I tried to cache the results of those queries on the module level like this: @lru_cache() def query_db(db, args): # do the "expensive" query

Re: on implementing a toy oop-system

2022-09-28 Thread Meredith Montgomery
Meredith Montgomery writes: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> Meredith Montgomery writes: >>>Is that at all possible somehow? Alternatively, how would you do your >>>toy oop-system? >> >> Maybe something along those lines: >> >> from functools import partial >> >> def