[Python-ideas] Re: Extract variable name from itself

2023-11-08 Thread Rene Nejsum
A little late, but the requirement to "Extract variable name from itself" is widely used in Django. Each field in a Django model, knows it's own variable name user_name = models.CharField(...) The instance of CharField knows that it's variable name is "user_name", so that it can name the row i

[Python-ideas] Re: channel or message queue in asyncio

2021-06-19 Thread Rene Nejsum
Sound like a good idea. Would be supernice if the channel could receive (ch.get()) multiple types of events like: network messages (socket), UI input (mouse and keyboard events), file events (select?), timeouts, kernel events (shutdown) and signals besides internal messages (ch.put) br /Rene

Re: [Python-ideas] f-string "debug" conversion

2018-11-16 Thread Rene Nejsum
+1 for this, I would use it all the time for debugging and tracing programs breakpoints and IDE’s can be nice, but my code is filled with lines like: logger.debug(f“transaction_id={transaction_id}, state={state}, amount={amount}, etc={etc}”) So yeah, well +10 actually :-) /rene ___

Re: [Python-ideas] Civility on this mailing list

2016-10-17 Thread Rene Nejsum
Dear Brett/ I have been reading the python-idea archive from time to time over the past years and I joined the list about a month ago to promote my “crazy” async object idea. I did fear the response to a newcomer with an unlikely idea, but I must say the *everyone* has been extremely nice, writ

Re: [Python-ideas] async objects

2016-10-17 Thread Rene Nejsum
ly undermine > incumbents -- cf. the innovator's dilemma.) And it's "just" a matter > of implementation, not Python-the-language itself. But the bottom line > is: this is *the* core problem that you have to grapple with if you > want to make any radical improvements

Re: [Python-ideas] async objects

2016-10-17 Thread Rene Nejsum
:06, Nick Coghlan wrote: > > On 5 October 2016 at 16:49, Rene Nejsum wrote: >>> On 04 Oct 2016, at 18:40, Sven R. Kunze wrote: >>> I don't think that's actually what I wanted here. One simple keyword should >>> have sufficed just like golang did. So, th

Re: [Python-ideas] async objects

2016-10-05 Thread Rene Nejsum
> On 06 Oct 2016, at 07:15, Stephen J. Turnbull > wrote: > > Nick Coghlan writes: > >> Python's core runtime model is the C runtime model: threads (with a >> local stack and access to a global process heap) and processes (which >> contain a heap and one or more threads). Anything else we do (w

Re: [Python-ideas] async objects

2016-10-05 Thread Rene Nejsum
> On 05 Oct 2016, at 21:20, Sven R. Kunze wrote: > > On 05.10.2016 18:06, Nick Coghlan wrote: >> [runtime matters] > > I think I understand your point. > > I also hope that others and me could provide you with our perspective. We see > Python not as a C-like runtime but as an abstract modelli

Re: [Python-ideas] async objects

2016-10-05 Thread Rene Nejsum
> On 04 Oct 2016, at 18:15, Guido van Rossum wrote: > > On Tue, Oct 4, 2016 at 4:30 AM, Nick Coghlan wrote: >>class SomeClass(object): >>def some_sync_method(self): >>return 42 >>async def some_async_method(self): >>await asyncio.sleep(3) >>

Re: [Python-ideas] async objects

2016-10-04 Thread Rene Nejsum
> On 04 Oct 2016, at 18:40, Sven R. Kunze wrote: > > On 04.10.2016 09:50, Stephen J. Turnbull wrote: >> As I understand the main point, Sven and Rene don't believe that [the >> kind of] async code [they want to write] should need any keywords; >> just start the event loop and invoke functions, a

Re: [Python-ideas] async objects

2016-10-04 Thread Rene Nejsum
> On 04 Oct 2016, at 07:26, Chris Angelico wrote: > > On Tue, Oct 4, 2016 at 4:25 PM, Rene Nejsum wrote: >>> On 04 Oct 2016, at 02:09, Stephen J. Turnbull >>> wrote: >>> >>> Rene Nejsum writes: >>>> I believe that you should be abl

Re: [Python-ideas] async objects

2016-10-04 Thread Rene Nejsum
> On 03 Oct 2016, at 23:32, Greg Ewing wrote: > > Yann Kaiser wrote: >> The way I see it, the great thing about async/await as opposed to threading >> is that it is explicit about when execution will "take a break" from your >> function or resume into it. > > Another thing is that async/await

Re: [Python-ideas] async objects

2016-10-03 Thread Rene Nejsum
> On 04 Oct 2016, at 02:48, C Anthony Risinger wrote: > > On Oct 3, 2016 7:09 PM, "Stephen J. Turnbull" > <mailto:turnbull.stephen...@u.tsukuba.ac.jp>> wrote: > > > > Rene Nejsum writes: > > > > > I believe that you should be able

Re: [Python-ideas] async objects

2016-10-03 Thread Rene Nejsum
> On 04 Oct 2016, at 02:09, Stephen J. Turnbull > wrote: > > Rene Nejsum writes: >> I believe that you should be able to code concurrent code, without >> being to explicit about it, but let the runtime handle low-level >> timing, as long as you know your cod

Re: [Python-ideas] async objects

2016-10-03 Thread Rene Nejsum
plicit about it, but let the runtime handle low-level timing, as long as you know your code will execute in the intended order. br /Rene > > On Sun, Oct 2, 2016, 14:26 Rene Nejsum <mailto:r...@stranden.com>> wrote: > Having followed Yury Selivanov yselivanov.ml <http://yseli

[Python-ideas] async objects

2016-10-02 Thread Rene Nejsum
Having followed Yury Selivanov yselivanov.ml at gmail.com proposal to add async/await to Python (PEP 492 Coroutines with async and await syntax and (PEP 525 Asynchronous Generators) and and especially the discussion about PEP 530: Asynchronous Comprehensions I would like t