Re: Simple webserver

2023-10-18 Thread Janis Papanagnou via Python-list
On 19.10.2023 01:23, Chris Angelico wrote: > [snip] > > Hope that's enough to get you started! I'd be delighted to help > further if you run into difficulties. Thanks for your quick reply, Chris! This is already great information! I'll dive into your resources soon, and I also appreciate your off

Re: Any possible type alias that can also set a default value for a function arg?

2023-10-18 Thread Chris Angelico via Python-list
On Thu, 19 Oct 2023 at 10:11, Matthew Carruth via Python-list wrote: > > We have the `Optional[T]` type as a short-hand for Union[T | None] and > telling us that said argument may not be present. > > However, I find that a majority of the time, we also want to set a default > value of None on th

Re: Simple webserver

2023-10-18 Thread Chris Angelico via Python-list
On Thu, 19 Oct 2023 at 10:07, Janis Papanagnou via Python-list wrote: > > I am pondering about writing a client/server software with > websockets as communication protocol. The clients will run > in browser as Javascript programs and the server may be in > any (any sensible) programming language r

Any possible type alias that can also set a default value for a function arg?

2023-10-18 Thread Matthew Carruth via Python-list
We have the `Optional[T]` type as a short-hand for Union[T | None] and telling us that said argument may not be present. However, I find that a majority of the time, we also want to set a default value of None on the argument so that it can be evaluated without doing a getattr() check first. i

Simple webserver

2023-10-18 Thread Janis Papanagnou via Python-list
I am pondering about writing a client/server software with websockets as communication protocol. The clients will run in browser as Javascript programs and the server may be in any (any sensible) programming language running standalone to be connected remotely by the browser-based JS clients. I fo