[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

[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

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] async objects

2016-10-06 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

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

Re: [Python-ideas] async objects

2016-10-04 Thread Rene Nejsum
> On 04 Oct 2016, at 07:26, Chris Angelico <ros...@gmail.com> wrote: > > On Tue, Oct 4, 2016 at 4:25 PM, Rene Nejsum <r...@stranden.com> wrote: >>> On 04 Oct 2016, at 02:09, Stephen J. Turnbull >>> <turnbull.stephen...@u.tsukuba.ac.jp> wrote: >>

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. > >

Re: [Python-ideas] async objects

2016-10-03 Thread Rene Nejsum
ithout being to explicit 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 <r...@stranden.com > <mailto:r...@stranden.com>> wrote: >