In this episode we write a full-text search engine using bloom filters! What other packages are you aware of that can act as search engines?

2020-06-14 Thread sjkelleyjr
https://youtu.be/MHatF6Hpm1U -- https://mail.python.org/mailman/listinfo/python-list

Re: close() the file when opening "with"?

2020-06-14 Thread Terry Reedy
On 6/14/2020 6:36 AM, Bischoop wrote: On 2020-06-14, Chris Angelico wrote: On Sun, Jun 14, 2020 at 8:16 PM Bischoop wrote: So far I learnt "with" closes the file opened therefore "Generally" no need to close() file. I'm worry about this "Generally", then close() or not? Where did you lear

Multiple event loops within the same thread ?

2020-06-14 Thread J. Pic
Hi all, It's possible to create several event loops in the same thread by calling asyncio.new_event_loop() Question: is there any use case where that could be useful ? Thank you in advance -- ∞ -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: python 3.8.3 fails

2020-06-14 Thread Terry Reedy
On 6/13/2020 2:38 PM, Dennis Lee Bieber wrote: On Sat, 13 Jun 2020 17:10:46 +0100, MRAB declaimed the following: I have Windows 10 Home and the stock Python from python.org. Typing just "python" at the Powershell prompt starts Python without a problem. 99 44/100% sure what the OP cal

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread zljubisic
Thanks for the video. Now it is clear to me what has happened and why copy solves the problem. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread zljubisic
params = {} if params is None else params.copy() has solved the problem. I have provided just a toy example here. Execute method actually takes dict[str, List]. List contains objects. Each object has two properties, so I have a logic that analyzes these properties and returns None or List as a

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread Peter J. Holzer
On 2020-06-14 19:44:32 +0200, Peter J. Holzer wrote: > [1] There is a very good talk by Raymond Hettinger on how variables and > objects in Python work. Unfortunately I can't find it at the moment. Sorry, that talk was by Ned Batchelder (that's why I couldn't find it): https://www.youtube.com

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread Peter J. Holzer
On 2020-06-14 08:20:46 -0700, zljubi...@gmail.com wrote: > consider this example: > > from typing import Dict, List > > > class chk_params: > def execute(self, params: Dict[str, List] = None): > if params is None: > params = {} > > for k, v in params.items(): >

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread Peter Otten
zljubi...@gmail.com wrote: > Hi, > > consider this example: > > from typing import Dict, List > > > class chk_params: > def execute(self, params: Dict[str, List] = None): > if params is None: > params = {} > > for k, v in params.items(): > params[k]

Re: close() the file when opening "with"?

2020-06-14 Thread Peter J. Holzer
On 2020-06-14 10:12:26 -, Bischoop wrote: > So far I learnt "with" closes the file opened therefore "Generally" no > need to close() file. I'm worry about this "Generally", then close() or > not? In some cases you don't want the file to be automatically closed when you leave the context where

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread Dieter Maurer
zljubi...@gmail.com wrote at 2020-6-14 08:20 -0700: >Hi, > >consider this example: > >from typing import Dict, List > > >class chk_params: >def execute(self, params: Dict[str, List] = None): >if params is None: >params = {} > >for k, v in params.items(): >

Re: How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread Kushal Kumaran
zljubi...@gmail.com writes: > Hi, > > consider this example: > > from typing import Dict, List > > > class chk_params: > def execute(self, params: Dict[str, List] = None): > if params is None: > params = {} > > for k, v in params.items(): > params[k] = [

How to keep Dict[str, List] default method parameter as local to the method?

2020-06-14 Thread zljubisic
Hi, consider this example: from typing import Dict, List class chk_params: def execute(self, params: Dict[str, List] = None): if params is None: params = {} for k, v in params.items(): params[k] = [val + 10 for val in v] return params.values

Re: Python database compatibility

2020-06-14 Thread Siddharth Joshi
Thanks Neil for your input . I am looking for opportunities to connect to the Tandem DB ( enscribe) via using Payton programs to analyse the data /patterns of the txns. I am very new in Python world so don,t know how these can be achieved ! In our setup , Tandem DB is not connected via any other 3r

Re: Convert and analyze image data in a spreadsheet.

2020-06-14 Thread Vincent Davis
Dennis, Thanks for your ideas. The researcher I am working with just told me the data is wrong and needs to send me new data and there are other problems with exactly what their research questions is. So this goes nowhere for now. Thanks Vincent Davis 720-301-3003 *Want to get a hold of me?* *SM

Re: close() the file when opening "with"?

2020-06-14 Thread Bischoop
On 2020-06-14, Chris Angelico wrote: > On Sun, Jun 14, 2020 at 8:16 PM Bischoop wrote: >> >> >> So far I learnt "with" closes the file opened therefore "Generally" no >> need to close() file. I'm worry about this "Generally", then close() or >> not? > > Where did you learn that? Can you cite a re

Re: close() the file when opening "with"?

2020-06-14 Thread Chris Angelico
On Sun, Jun 14, 2020 at 8:16 PM Bischoop wrote: > > > So far I learnt "with" closes the file opened therefore "Generally" no > need to close() file. I'm worry about this "Generally", then close() or > not? Where did you learn that? Can you cite a reference? If you use a with block, the file is g

close() the file when opening "with"?

2020-06-14 Thread Bischoop
So far I learnt "with" closes the file opened therefore "Generally" no need to close() file. I'm worry about this "Generally", then close() or not? -- https://mail.python.org/mailman/listinfo/python-list