Re: Use of locals() with SQL placeholders

2026-09-03 Thread dn via Python-list
On 03/09/2026 21:50, Peter J. Holzer wrote: The Python database API allows the use of a dict to specify the values for the placeholders in the SQL statement. For example: csr = conn.cursor() ... csr.execute( """ select feature as name, description as label

Re: Use of locals() with SQL placeholders

2026-09-03 Thread Chris Angelico via Python-list
On Thu, 3 Sept 2026 at 19:52, Peter J. Holzer wrote: > Pros: > > * it looks very clean > * it makes the code shorter > * The names of the placeholders are always in sync with the names of >local variables > > Cons: > > * Less explicit, so it may not be as obvious what the parameters are >

Use of locals() with SQL placeholders

2026-09-03 Thread Peter J. Holzer
The Python database API allows the use of a dict to specify the values for the placeholders in the SQL statement. For example: csr = conn.cursor() ... csr.execute( """ select feature as name, description as label from service s join permission p on s.id =

Re: Apple changed their documentation at my request but it proves they don't care about privacy

2026-09-03 Thread Anton Shepelev
Paul Rubi: > Your car broadcasts its license plate number to anyone in > sight of it, yet people are rightfully ticked off at Flock > cameras everywhere recording them. Because machine data acquirement is more powerful. -- () ascii ribbon campaign -- against html e-mail /\

Re: Apple changed their documentation at my request but it proves they don't care about privacy

2026-09-03 Thread Maria Sophia
Lawrence D'Oliveiro wrote: >> Those scripts proved I could collect a list of every single access >> point in Apple's database, just as researchers Eric Rye and Dave >> Levin did, using a simple perl script which proved the results of >> their paper, and which went further to prove that my own >>

Re: Use of locals() with SQL placeholders

2026-09-03 Thread Chris Angelico via Python-list
On Fri, 4 Sept 2026 at 06:41, dn via Python-list wrote: > However, this is weaker than it may sound. Firstly, type-hints work at > IDE-time, cf execution-time. Secondly, it is possible to inject/append > to the t-string, eg `sql + f"Little Bobby Tables"` because there is no > guard/it's 'silent'

Apple changed their documentation at my request but it proves they don't care about privacy

2026-09-03 Thread Maria Sophia
This is an update to the WPS scripts that I posted a few months ago. Those scripts proved I could collect a list of every single access point in Apple's database, just as researchers Eric Rye and Dave Levin did, using a simple perl script which proved the results of their paper, and which went