Re: [Python-ideas] Secure string disposal (maybe other inmutable seq types too?)

2018-06-24 Thread Kyle Lahnakoski
Ezequiel (Ezekiel) Brizuela, How is the secret "password" getting into a Python variable?  It is coming from disk, or network? Do the buffers of those systems have a copy?  How about methods that operate on the secrets?  Do they internally decrypt secrets to perform the necessary operations? I h

[Python-ideas] Fwd: Replacing Infinite while Loops with an Iterator: async edition

2018-06-24 Thread jab
On Jun 23, 2018, at 21:11, Nathaniel Smith wrote: > He's asking for an async version of the 'iter' builtin, presumably > something like: > async def aiter(async_callable, sentinel): >while True: >value = await async_callable() >if value == sentinel: >break >

Re: [Python-ideas] Fwd: Replacing Infinite while Loops with an Iterator: async edition

2018-06-24 Thread Jelle Zijlstra
2018-06-24 12:30 GMT-07:00 : > On Jun 23, 2018, at 21:11, Nathaniel Smith wrote: > >> He's asking for an async version of the 'iter' builtin, presumably >> something like: >> async def aiter(async_callable, sentinel): >>while True: >>value = await async_callable() >>if value =

Re: [Python-ideas] Fwd: Replacing Infinite while Loops with an Iterator: async edition

2018-06-24 Thread jab
On Sun, Jun 24, 2018 at 3:34 PM Jelle Zijlstra wrote: > There is an open issue for this: https://bugs.python.org/issue31861. It > proposes adding aiter() and anext() as builtins. > Oh, great to see that, thanks! I'll follow along on that issue, and maybe even contribute a PR if I can. __

Re: [Python-ideas] Secure string disposal (maybe other inmutable seq types too?)

2018-06-24 Thread Paul Moore
On 24 June 2018 at 03:44, Terry Reedy wrote: > On 6/23/2018 8:14 PM, Greg Ewing wrote: >> >> Paul Moore wrote: >> >>> a = SafeStr("my secret data") >>> ... work with a as if it were a string >>> del a >> >> >> But in order to create the SafeStr, you need to first have >> the data in the form of an

Re: [Python-ideas] Fwd: Replacing Infinite while Loops with an Iterator: async edition

2018-06-24 Thread Greg Ewing
[email protected] wrote: On Jun 23, 2018, at 21:11, Nathaniel Smith > wrote: He's asking for an async version of the 'iter' builtin, presumably something like: async def aiter(async_callable, sentinel): while True: value = await async_callab

Re: [Python-ideas] Replacing Infinite while Loops with an Iterator: async edition

2018-06-24 Thread jab
Yes, exactly. Wouldn't that be a useful built-in? (And, is this really the first time this idea is being discussed?) Thanks, Josh On Saturday, June 23, 2018 at 9:12:35 PM UTC-4, Nathaniel Smith wrote: > > On Sat, Jun 23, 2018 at 5:58 PM, Greg Ewing > wrote: > > [email protected] wrote: > >