On 12/21/2023 4:38 PM, Steve Jorgensen wrote:
I am finding that it would be useful to be able to define a dataclass that is
an abstract base class and define some of its field as abstract.
As I am typing this, I realize that I could presumably write some code to
implement what I'm asking for.
On 10/21/2023 8:31 PM, Chris Angelico wrote:
On Sun, 22 Oct 2023 at 11:29, MRAB wrote:
I think what the OP wants is to have re.match either return a match or
raise an exception.
Yes, and my point is that simply attempting to access an attribute
will do exactly that. It's not a silent failure.
On Sep 23, 2023, at 5:37 PM, Dom Grigonis wrote:It seems that my guess was correct. There was a commit, when only the first part was working:https://github.com/python/cpython/pull/13123/commits/67977672360659f203664d23cfc52b5e07e4381aSince I wrote that commit: no one is saying it’s impossible
On 6/23/2023 11:34 AM, Joao S. O. Bueno wrote:
On Fri, Jun 23, 2023 at 12:18 PM Eric V. Smith wrote:
On Jun 23, 2023, at 9:34 AM, Joao S. O. Bueno
wrote:
On Fri, Jun 23, 2023 at 2:35 AM Jelle Zijlstra
wrote:
El jue, 22 jun 2023 a las 8:22, Randolf
On Jun 23, 2023, at 9:34 AM, Joao S. O. Bueno wrote:On Fri, Jun 23, 2023 at 2:35 AM Jelle Zijlstra wrote:El jue, 22 jun 2023 a las 8:22, Randolf Scholz () escribió:Dataclasses should provide a way to ignore a type hinted attributes, and not
You should bring this up on https://discuss.python.org/c/ideas/6 , which is
where ideas are discussed these days.
This mailing list should be retired. I’ll mention that elsewhere.
--
Eric
> On Feb 16, 2023, at 9:57 AM, Arusekk wrote:
>
> Hi all!
>
> I was writing a tutorial on the
Jim Baker's draft PEP gives runtime behavior to tagged strings. I agree
it would all be pointless if it's just hints to an editor. Sorry, I
again don't have a handy link to his PEP. But it's similar in spirit to
PEP 501.
Eric
On 12/22/2022 2:36 PM, Joao S. O. Bueno wrote:
I am not
Jim Baker has been working on tagged strings, and Guido has a working
implementation. See https://github.com/jimbaker/tagstr/issues/1
I thought Jim had a draft PEP on this somewhere, but I can’t find it.
--
Eric
> On Dec 17, 2022, at 11:14 AM, e...@emilstenstrom.se wrote:
>
> Hi everyone!
>
On 11/23/2022 3:02 PM, Chris Angelico wrote:
On Thu, 24 Nov 2022 at 06:46, Barry Scott wrote:
I have written a lot of low level protocol and IOCTL calls that cannot think of
a time this would have helped me.
struct is often a mean to create blocks of binary data.
Long strings of binary data
Sorry for top posting: I’m on the road.
inspect.signature can help with this.
--
Eric
> On Jul 27, 2022, at 9:22 AM, Chris Angelico wrote:
>
> On Wed, 27 Jul 2022 at 22:54, Mathew Elman wrote:
>>
>> Chris Angelico wrote:
Again, I am not pro this idea, just answering the questions
> On Jun 22, 2022, at 2:12 PM, Paul Moore wrote:
>
> On Wed, 22 Jun 2022 at 18:35, David Mertz, Ph.D.
> wrote:
>>
>> Hi Martin,
>>
>> Short answer: yes, I agree.
>> Slightly longer: I would be eternally grateful if you wish to contribute to
>> the PEP with any such expansion of the
On 6/18/2022 5:34 PM, Paul Moore wrote:
After all, it has the
advantage of working on older versions of Python (and given that one
of your use cases is Textual, I can't imagine anyone would be happy if
that required Python 2.12+...)
Guido's "no 2.8" shirt apparently didn't stop 2.9 through
On 6/17/2022 10:53 AM, Chris Angelico wrote:
The only two possible behaviours are:
1) It does the single obvious thing: n defaults to the length of
items, and items defaults to an empty tuple.
2) It raises UnboundLocalError if you omit n.
...
Would you prefer that I simply mandate that it be
On 6/7/2022 4:59 PM, Chris Angelico wrote:
On Wed, 8 Jun 2022 at 00:36, wrote:
Hello!
Do you know if there has been discussions around why is the default argument is
positional only in the dict methods get and pop?
I think
```
d.get(key, default=3)
```
way more readable than
```
On 6/5/2022 1:22 PM, Benedict Verhegghe wrote:
Op 5/06/2022 om 18:47 schreef David Mertz, Ph.D.:
Sure, that's nice enough code and has the same big-O complexity. I
suspect set difference is a little faster (by a constant multiple)
because it hits C code more, but I haven't benchmarked.
The
15 matches
Mail list logo