I thought this is called python-ideas, meaning it’s ok to bring ideas even if
they are ugly or stupid. No need to introduce it in Python if it’s too much but
it might induce discussions. I am not per se convinced of the syntax I wrote.
Any suggestion to make it better is more than welcomed,
Abdulla Al Kathiri writes:
> Sorry to bother you again with the generic thing.
> Golang will soon release a new version with Generics. I like their
> way of doing it. Like Rust, they don’t bother with TypeVars. It
> makes you wonder why we are not doing something similar in Python.
Typing
Hello all,
Sorry to bother you again with the generic thing. Golang will soon release a
new version with Generics. I like their way of doing it. Like Rust, they don’t
bother with TypeVars. It makes you wonder why we are not doing something
similar in Python.
[T: Type] ——> T is invariant and
Currently, some type checkers rightly complain that a method is decorated
with abc.abstractmethod when the class's type does not inherit from
ABCMeta. Adding a metaclass is a fairly heavy dependency since you're
forced to poison all of your other metaclasses with the same base
metaclass. It
> On Feb 7, 2022, at 1:55 AM, Chris Angelico wrote:
>
…
> def spam():
>bird = "Norwegian Blue"
>volts = 4e6
>return "{volts}V insufficient to voom {bird}".format(**locals())
This is completely off topic, but: the better way to do this is with
.format_map(locals()).
This public
On Tue, 8 Feb 2022 at 01:27, Eric V. Smith wrote:
>
>
> > On Feb 7, 2022, at 1:55 AM, Chris Angelico wrote:
> >
> …
> > def spam():
> >bird = "Norwegian Blue"
> >volts = 4e6
> >return "{volts}V insufficient to voom {bird}".format(**locals())
>
> This is completely off topic, but: the