[Python-Dev] Re: Problems with dict subclassing performance

2021-08-19 Thread Marco Sulla
Anyway, Cannon, don't take it personal. I accuse the entire system,
the whole CoC council.

Indeed I was also fired some times ago from the python-ideas list:
https://mail.python.org/archives/list/python-id...@python.org/message/KV4K4KS4MYTP5T5W5XKZYENGHCJYWOFR/

The reasons?

https://mail.python.org/archives/list/python-id...@python.org/message/VJMO4HOZGFCAKY2WA2RACHITPECFDKQ7/

Because I responded to "Apparently you didn't read the post" with
"Apparently you don't know Python". A bit too sarcastic, I admit, but
enough to ban a person? Furthermore, I ended the post with "KISSes".
This was considered a **rude** joke. From when KISS is considered
rude???

Another problematic post:
https://mail.python.org/archives/list/python-id...@python.org/message/GKBF4NKVBASKUN7YJS6GDIMUUSAY7T2A/

Because I wanted to be respectful and I didn't know about this stupid
rule here that "mister" is considered an insult X-D

Another: 
https://mail.python.org/archives/list/python-id...@python.org/message/X3SGPDEFJHKSNYXIW66AWJOW3PAKCOGQ/

Because I said that first() is sexy. Sexualized language. Every
serious programmer knows that "sexy" is another way to say "syntactic
sugar".

Another one: 
https://mail.python.org/archives/list/python-id...@python.org/message/QSMZKLQI47MZXDNXZ4HDOMDHEQLFUJYL/
because I said "I can change my mind, I'm not a member of Daesh." Odd
reference to an extremist organization. This is so ridiculous that I
won't comment.

I tried to defend myself by posting to conduct...@python.org . They
never responded to me. So don't take it personal, Cannon.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/RUDKUEJJSNXPV5PMWMNI7VEUQCMLW6HS/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Dropping out of this list

2021-08-19 Thread Marco Sulla
I think you're writing to me. I simply clicked the "Reply to all"
button because I'm lazy. And that's me that is polemic? X-D
Furthermore you already replied to this topic before my intervention,
so this makes me laugh doubly X-D
Who's the spammer? Let the people decide

On Thu, 19 Aug 2021 at 20:38, Terry Reedy  wrote:
>
> As I said before, I am using Ignore Thread to ignore these threads.
> Please stop evading my wishes by sending me private discourtesy copies.
>   At least 3 people have done that when *not* responding to anything I
> wrote.
>
> --
> Terry Jan Reedy
>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/KVI3OIM5N5XJLIWFHEMH67GMF6JFJDOT/
> Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/W5FQBTX5CI42W7AYEEK5NEQYLYPXE7U7/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Dropping out of this list

2021-08-19 Thread Marco Sulla
I agree with you, and I would say that all this chaos will be avoided,
if people leave the discussion between me and Steven alone. You can't
say "I'm sick of spamming" if you put logs on the fire.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/LFZBBEWUJ2B6NSH3MBWKJMAA7WILAMDP/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Dropping out of this list

2021-08-19 Thread Marco Sulla
Excuse me all for the useless back-and-forth... I can assure you I'm
the last person who wanted it. But if someone insults me, I reply.
Anyway, this will not last long. Goodbye and thanks for all the fish.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QROBZWX5CKXOROUIA65B7TPOJ7O5TRUL/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-18 Thread Marco Sulla
On Wed, 18 Aug 2021 at 21:31, Brett Cannon  wrote:
> I rarely correct people about this, but it's actually Dr. Cannon; if you're 
> going to insult me, please use the proper title at least.

Quoting Pulp Fiction, are you a woman? I think not, so Mr. Cannon is
not incorrect. Also my title is Dr. Sulla, but if someone calls me
Mister Sulla I do not get angry.
Anyway, Mister Cannon, I said no insult to you, only the pure truth.
You banned me for a quibble and you continue to ban me for quibbles.
And I only wanted to be helpful. Thank you very much. Let the trolls
like Steven proliferate, while banning dumb people like me.

You remind me the song Le Gorille of George Brassens. A suggestion:
beware of gorillas...
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/63NHHVH5LT3545IXVTCHISYCVM3GVRVY/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-18 Thread Marco Sulla
The silly mistake you all have made is to blame my English error and
not the unacceptable behaviour of Steven.
The fact I was really angry with Steven was really clear, since all
have replied to this. And someone declassed to "sarcasm" the
insinuation of Steven.

And I've done examples to make it clear it's not possible to not
understand the sense of my indignation, and the words of Steven cannot
be declassed (or subclassed?) to sarcasm.

And I will be banned for this! Great! :D

Ah, @Mr. Cannon, I remember the BDFL said in a post "There are too
many cocks here". I also censored cock, but you simply reprimanded
him. How much CPython code must one write to be treated humanely? Go
and ban me permanently please, I'm really sick.

PS: Furthermore, I repeat, you all blame Google:
https://www.google.com/search?channel=fs=ubuntu=pretendere+in+inglese

On Wed, 18 Aug 2021 at 09:00, Steve Holden  wrote:
>
> Your inflated sense of your own significance is unfortunate, since it appears 
> to prohibit you from considering the possibility you might have made a rather 
> silly mistake here, and one which is calculated to move you further away from 
> your stated goals.
>
> Kind regards,
> Steve
>
>
> On Tue, Aug 17, 2021 at 9:31 PM Marco Sulla  
> wrote:
>>
>> On Sun, 15 Aug 2021 at 22:30, Marco Sulla  
>> wrote:
>> > Oh, this is enough. The sense of the phrase was very clear and you all
>> > have understood it. Remarking grammatical errors is a gross violation
>> > of the Netiquette. I ask __immediately__ the intervent of a moderator,
>> > even if I quite sure, since I'm mister No One and you are Terry Reed
>> > and Steven D'Aprano, that this will be against me X-D
>>
>> Ahahhaahh, call me Marco "Cassandra" Sulla.
>>
>> Mr. Cannon, I was sure about your response. Please ban me, it will be
>> a pleasure to be banned by you for specious reasons. It's your
>> specialty.
>>
>> I want to remember here that you banned me from the Py Forum because I
>> said "Even a child can understand my code", and you _demanded_ my
>> excuses. Since I found the accusation ridiculous, I've made my excuses
>> to all children that do not understand my code. You banned me and even
>> Steven defended me.
>>
>> I've been the moderator for a forum for years, and let me say, you are
>> not a good moderator. You are hard-mannered. See Tim. He calmed me
>> down with two posts. You all have to learn from him, as coders,
>> moderators and human beings.
>>
>> That said, please ban me permanently, because I'll _never_ give you my
>> excuses. What I said is the pure truth.
>>
>> PS: as a side note, I started to get downvotes from when this useless
>> polemic started. Since, I repeat, I have more than 13k reputation on
>> SO, and since the question had about 20 votes without dirty tricks, as
>> Steven subtly insinuates, all of this makes me laugh. Do your worst,
>> you all little men. As a Mister No One, I will be **PROUD** to be
>> banned as Stephan Krah.
>>
>>
>> On Mon, 16 Aug 2021 at 18:52, Brett Cannon  wrote:
>> >
>> >
>> >
>> > On Sun, Aug 15, 2021 at 2:55 PM Marco Sulla  
>> > wrote:
>> >>
>> >> On Sun, 15 Aug 2021 at 23:33, Tim Peters 
>> >> wrote:ople have said now, including me, they had no idea what
>> >> > you meant.by "I pretend your immediate excuses". It's not a complaint
>> >> > that it's expressed inelegantly, but that they can't make _any_ sense
>> >> > of it. By my count, this is at least the second time you've declined
>> >> > to explain what you meant, but instead implied the person who said
>> >> > they couldn't understand it was being dishonest.
>> >>
>> >> I repeat, even the worst AI will understand from the context what I
>> >> meant. But let me do a very rude example:
>> >
>> >
>> > Rude examples are never necessary and are not acceptable (don't forget we 
>> > have kids who participate on this mailing list).
>> >
>> > I have referred the whole thread to the Conduct WG so they can settle who 
>> > was out of line. Otherwise I advise everyone to mute this thread.
>> ___
>> Python-Dev mailing list -- python-dev@python.org
>> To unsubscribe send an email to python-dev-le...@python.org
>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>> Message archived at 
>> https://mail.python.org/archives/list/python-dev@python.org/message/BM4AQR347MPNXRDF3FHBYPOOXPHMYQU2/
>> Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/V3UM3EOZZYLZXIEULBCOOM7RD3LPZOJM/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-17 Thread Marco Sulla
My time is short, so thank you for focusing on the real subject.

On Mon, 16 Aug 2021 at 11:00, Jeff Allen  wrote:
> I have spent a lot of time reading typeobject.c over the years I've been 
> looking at an alternative implementation. It's quite difficult to follow, and 
> full of tweaks for special circumstances. So I'm impressed with the 
> understanding that "user2357112 supports Monica" brings to the subject.

I was impressed too. I suppose it worked on some C Extension and
discovered the behaviour herself.

> When a built-in type like dict is defined in C, pointers to its C 
> implementation functions are hard-coded into slots in the type object. In 
> order to make each appear as a method to Python, a descriptor is created when 
> building the type that delegates to the slot (so sq_contains generates a 
> descriptor __contains__ in the dictionary of the type.
>
> Conversely, if in a sub-class you define __contains__, then the type builder 
> will insert a function pointer in the slot of the new type that arranges a 
> call to __contains__. This will overwrite whatever was in the slot.
>
> In a C implementation, you can also define methods (by creating a PyMethodDef 
> the tp_methods table) that become descriptors in the dictionary of the type. 
> You would not normally define both a C function to place in the slot *and* 
> the corresponding method via a PyMethodDef. If you do, the version from the 
> dictionary of the type will win the slot, *unless* you mark the method 
> definition (in its PyMethodDef) as METH_COEXIST.
>
> This exception is used in the special case of dict (and hardly anywhere else 
> but set I think). I assume this is because some important code calls 
> __contains__ via the descriptor, rather than via the slot (which would be 
> quicker), and because an explicit definition is faster than a descriptor 
> created automatically to wrap the slot.
>
> Now, when you create a sub-class, the table of slots is copied first, then 
> the type is checked for definitions of special methods, and these are allowed 
> to overwrite the slot, unless they are slot wrappers on the same function 
> pointer the slot already contains. I think at this point the slot is 
> re-written to contain a wrapper on __contains__, which has been inherited 
> from dict.__contains__, because it isn't a *slot wrapper* on the same 
> function. For example:
>
> >>> dict.__contains__
> 
> >>> str.__contains__
> 
>
> >>> class S(str): pass
>
> >>> S.__contains__
> 
> >>> D.__contains__
> 

And is it not possible for subclasses to continue to use the optimized
version, if some contract will be maintained?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/UGBL62CDO2XYXAVK6RAOS46ORGL545MV/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-17 Thread Marco Sulla
On Sun, 15 Aug 2021 at 22:30, Marco Sulla  wrote:
> Oh, this is enough. The sense of the phrase was very clear and you all
> have understood it. Remarking grammatical errors is a gross violation
> of the Netiquette. I ask __immediately__ the intervent of a moderator,
> even if I quite sure, since I'm mister No One and you are Terry Reed
> and Steven D'Aprano, that this will be against me X-D

Ahahhaahh, call me Marco "Cassandra" Sulla.

Mr. Cannon, I was sure about your response. Please ban me, it will be
a pleasure to be banned by you for specious reasons. It's your
specialty.

I want to remember here that you banned me from the Py Forum because I
said "Even a child can understand my code", and you _demanded_ my
excuses. Since I found the accusation ridiculous, I've made my excuses
to all children that do not understand my code. You banned me and even
Steven defended me.

I've been the moderator for a forum for years, and let me say, you are
not a good moderator. You are hard-mannered. See Tim. He calmed me
down with two posts. You all have to learn from him, as coders,
moderators and human beings.

That said, please ban me permanently, because I'll _never_ give you my
excuses. What I said is the pure truth.

PS: as a side note, I started to get downvotes from when this useless
polemic started. Since, I repeat, I have more than 13k reputation on
SO, and since the question had about 20 votes without dirty tricks, as
Steven subtly insinuates, all of this makes me laugh. Do your worst,
you all little men. As a Mister No One, I will be **PROUD** to be
banned as Stephan Krah.


On Mon, 16 Aug 2021 at 18:52, Brett Cannon  wrote:
>
>
>
> On Sun, Aug 15, 2021 at 2:55 PM Marco Sulla  
> wrote:
>>
>> On Sun, 15 Aug 2021 at 23:33, Tim Peters 
>> wrote:ople have said now, including me, they had no idea what
>> > you meant.by "I pretend your immediate excuses". It's not a complaint
>> > that it's expressed inelegantly, but that they can't make _any_ sense
>> > of it. By my count, this is at least the second time you've declined
>> > to explain what you meant, but instead implied the person who said
>> > they couldn't understand it was being dishonest.
>>
>> I repeat, even the worst AI will understand from the context what I
>> meant. But let me do a very rude example:
>
>
> Rude examples are never necessary and are not acceptable (don't forget we 
> have kids who participate on this mailing list).
>
> I have referred the whole thread to the Conduct WG so they can settle who was 
> out of line. Otherwise I advise everyone to mute this thread.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/BM4AQR347MPNXRDF3FHBYPOOXPHMYQU2/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
On Mon, 16 Aug 2021 at 03:15, Tim Peters  wrote:
> You think Steven was indirectly accusing you of unethical behavior
> (trolling for StackOverflow upvotes)?. That's not the sense I got from
> his original reply, but I can understand it if you did. If that's your
> complaint, I'll leave it to Steven to say what his intent was - and,
> if appropriate, to apologize for unintended offense.

Thank you.

> This isn't about advanced English usage. It's about the ordinary
> meanings of ordinary words in (what should be!) simple contexts.  If I
> said to you
>
> Capisco con il pesce il nodo insolito!
>
> I doubt you'd suggest I study Italian at the University of Bologna ;-)

I suppose the incompressible phrase, per se, could be code of the
programming language Monicelli, la supercazzola:

https://github.com/esseks/monicelli#declaration-1

Anyway, I suppose the phrase will be clear in the context ;-)

PS: comunque rimani sempre un geniaccio

PPS: @Chris: "pretend" derives from latin praetendere, pre-tendere, to
tend first. Anyway, blame Google:
https://www.google.com/search?channel=fs=ubuntu=pretendere+in+inglese
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/5MIQTUBSIZKGPFU3VXWGDJY6EI2RZSVO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
I make an example: what if I said to you that you want, with your
response, only endear Tim? Is it for you sarcastic or a subtle
insinuation?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/L5AUCMDAYJJO2NVLGMS65UX7QTNODMFP/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
On Sun, 15 Aug 2021 at 23:58, Irit Katriel  wrote:
> The reality, Marco, is that this list is for discussions about python 
> development, not for seeking help with understanding python.
> It is not appropriate to "ask for help" on this list, and you are not 
> entitled to a reply within X working days, or ever.
> People will engage with what you write if they want to.
>
> There are plenty of help-with-python forums. Good luck.

The answer, which I bet no one has read, is highly technical, and
involves a deep understanding of CPython, not Python. So there is no
other place where I could get help.

Furthermore, I asked for help in past for more stupid reasons in the
equivalent list on the forum, and I was not attacked this way. I
repeat, this is __unacceptable__, and it's very sad that also you
continue to grab at straws.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PRAY3E6QCRPRZ6FB6FELBG2G3ZAOFNDD/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
On Sun, 15 Aug 2021 at 23:33, Tim Peters 
wrote:ople have said now, including me, they had no idea what
> you meant.by "I pretend your immediate excuses". It's not a complaint
> that it's expressed inelegantly, but that they can't make _any_ sense
> of it. By my count, this is at least the second time you've declined
> to explain what you meant, but instead implied the person who said
> they couldn't understand it was being dishonest.

I repeat, even the worst AI will understand from the context what I
meant. But let me do a very rude example:


What if I said to Steven "I pretend immediate suck my $%#$"? Do you
think you and the others will not understand the sense? :D

C'Mon, you are offending my poor intelligence.

As I wanted to say, I pretend from Steven his excuses for his
insinuation, immediately. Is this clear now, or must I take an English
course at Cambridge?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/O3JB3FE33KMT3OHZCVH3XO6VNJTGH5NL/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
On Sun, 15 Aug 2021 at 23:12, Tim Peters  wrote:
>
> [Marco Sulla ]
> > Oh, this is enough. The sense of the phrase was very clear and you all
> > have understood it.
>
> Sincerely, I have no idea what "I pretend your immediate excuses."
> means, in or out of context.
>
> > Remarking grammatical errors is a gross violation
> > of the Netiquette. I ask __immediately__ the intervent of a moderator,
>
> I'm the only active moderator on this list, and I expect everyone has
> noticed I don't exercise those powers at all except to try to keep
> spam from showing up to begin with.
>
> I had no problem at all with your original post, but, as usual,
> _personally_ find almost no value in meta-posts (posts _about_ posts).
>
> People make them anyway, and that's OK by me. They eventually burn
> themselves out.
>
> I would _like_ it most if everyone dropped this thread now, unless
> they want to say something about the original topic (dict subclass
> performance). But, towards that end, I'm not going to threaten anyone
> with any moderation action.

Tim Peters, I had a real and deep respect for you and your work. Even
if I bet you don't care, you lost my respect for you.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/Q26TVPGZD6VTUQLMLXZWR2AXXAQ27U4N/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
It's the Netiquette, Chris. It's older than Internet. It's a gross
violation of the Netiquette remarking grammatical or syntactical
errors. I think that also the least advanced AI will understand what I
meant.

I think anyway that now the sense of my request is __very clear__. I
ask the intervention of a moderator. How can I do this? Thank you in
advance.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/SBMQJXJFD4PL2O4KWLEUYDWR6ZJYI4RI/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
Furthermore, I have 13k points of reputation on SO. They are also too
much for me. I don't need dirty tricks to raise them. So I __pretend__
excuses from Steven, if it is a man.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/S7GUBZ3X5LJRKS52U7BLQKQYVSAGLBIK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
On Sun, 15 Aug 2021 at 21:30, Terry Reedy  wrote:

I opened the bug https://bugs.python.org/issue44921 . Anyway, this
does not change the insinuation I got here.

> In any case, drop this tread, which started off wrongly.

This thread will be dropped when Steven will give me the excuses for
the unacceptable insinuation he wrote:

---
On Thu, 12 Aug 2021 at 12:54, Steven D'Aprano  wrote:
> Are you looking for upvotes on StackOverflow
---

> 2. This post has the form of spam

I asked for help, because I didn't know __nothing__ about what Monica
replied to me in the SO answer. And you say to me my post seems spam?
This is __not__ the way I was accustomed to be treated by the Py
Community!


> "up"? There is no update. A ping after just 4 days is a bit spammy.

Ooh. __Four__ days is spam. IMHO this is a bit offensive! 5 days
are a working week! Are you a Treant?

> On 8/15/2021 10:22 AM, Marco Sulla wrote:
> (without quoting his previous message>
> > On Thu, 12 Aug 2021 at 12:54, Steven D'Aprano  wrote:
> >> Are you looking for upvotes on StackOverflow
>
> A perhaps snarky response to a slightly spammy pair of posts.

Snarky? Subtle insinuation, IMHO. And you continue to mark my post as
spammy, when I simply tried to get help! This is unacceptable!

> As Chris implied, the second 'sentence' is not grammatical English

Oh, this is enough. The sense of the phrase was very clear and you all
have understood it. Remarking grammatical errors is a gross violation
of the Netiquette. I ask __immediately__ the intervent of a moderator,
even if I quite sure, since I'm mister No One and you are Terry Reed
and Steven D'Aprano, that this will be against me X-D
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/FSKE3DIK6XU7UBSFTIU5M7XGDQM7GXBF/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-15 Thread Marco Sulla
On Thu, 12 Aug 2021 at 12:54, Steven D'Aprano  wrote:
> Are you looking for upvotes on StackOverflow

This is unacceptable. I pretend your immediate excuses.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/DQLGNFLJ7KHDA2VGABDQ6JLR4GLHGM35/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Problems with dict subclassing performance

2021-08-12 Thread Marco Sulla
No ideas? Excuse me for the up.

On Fri, 6 Aug 2021 at 21:29, Marco Sulla  wrote:
>
> I've done an answer on SO about why subclassing `dict` makes the
> subclass so much slower than `dict`. The answer is interesting:
>
> https://stackoverflow.com/questions/59912147/why-does-subclassing-in-python-slow-things-down-so-much
>
> What do you think about?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ODHRCDEPOP3AUJJ6IKF2GFLOWJ5BY7TX/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Problems with dict subclassing performance

2021-08-06 Thread Marco Sulla
I've done an answer on SO about why subclassing `dict` makes the
subclass so much slower than `dict`. The answer is interesting:

https://stackoverflow.com/questions/59912147/why-does-subclassing-in-python-slow-things-down-so-much

What do you think about?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/TYS6SHWNA5AYTHQEA2AWUVZSYAQY2IHT/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Why list.sort() uses mergesort and not timsort?

2021-06-06 Thread Marco Sulla
On Sun, 6 Jun 2021 at 11:57, Christian Heimes  wrote:
>
> On 06/06/2021 11.42, Marco Sulla wrote:
> > As title. Is it faster for inplace sorting, or simply the
> > implementation of list.sort() was done before the implementation of
> > timsort?
>
> list.sort() uses timsort. What makes you think that Python uses mergesort?

In listobject.c, in the comment above list_sort_impl, there's written
"An adaptive, stable, natural mergesort". But now I see that after
there is "See listsort.txt" where it's stated "This describes an
adaptive, stable, natural mergesort, modestly called timsort".

> Tim Peters invented timsort for Python about twenty years ago. Tim a
> first generation Python core dev. Other languages like Java adopted
> timsort from Python later.

I know. Thank you for the answer :)

>
> Christian
>
>
>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/P7XFRAU6GL2CH6RBXPLGXEK4AL5KF2HV/
> Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/BGTTKCM4X6X24V2OZT3UHNHNBZSY5EP6/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Why list.sort() uses mergesort and not timsort?

2021-06-06 Thread Marco Sulla
As title. Is it faster for inplace sorting, or simply the
implementation of list.sort() was done before the implementation of
timsort?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/HTSJ7K4GYFZ2P6XUIQYDOTDAGCJDXJH6/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Where and how can I contribute?

2021-03-26 Thread Marco Sulla
I would contribute to the project in my spare time. Can someone point
me to some easy task? I know C and the Python C API a little.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/5EQWUYNGSTWGJONZCFRMK6XWXL36WCLR/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-28 Thread Marco Sulla
On Sat, 27 Feb 2021 at 00:35, Guido van Rossum  wrote:
> On Fri, Feb 26, 2021 at 3:18 PM Marco Sulla  
> wrote:
>>
>> Excuse me if I post here. Maybe is a stupid question: why, instead of
>> introducing except*, Python can't extend the functionality of except,
>> so it can do what except* would do?
>
>
> Good question. Here's an example:
> ```
> try:
> . . .
> except OSError as err:
> if err.errno != ENOENT:
> raise
> . . .
> ```
> If this would catch ExceptionGroup(OSError), the `err` variable would be an 
> ExceptionGroup instance, which does not have an `errno` attribute.

Thank you for the clarification :)

I must admit I read the PEP quickly, so I thought that the
subexception will be raised by except*, not the exception group. But
obviously this can't work.

The fact is I am really used to think that

except OsError as e

means "except for any OsError, which we name `e` from this moment on"

that I thought it applied also for except*. But, if I understood well

except* OsError as eg

means "except for any OsError contained in an ExceptionGroup. If the
OsError is not contained in an ExceptionGroup, Python wraps it in a
new ExceptionGroup. The ExceptionGroup is named `eg` from this moment
on"

I have to say that it's not obvious for me reading except* this way.
Anyway, I can't find a more readable semantic that does not use a new
keyword and it's short ^^'
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/XZRM57YQU3NRU5JLAHDULVR7TKUF5FT3/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-26 Thread Marco Sulla
Excuse me if I post here. Maybe is a stupid question: why, instead of
introducing except*, Python can't extend the functionality of except,
so it can do what except* would do?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/34E3TMVLHRT2UQSH5RWZXOPT6AQ6DTYZ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] A question about pattern matching

2020-11-24 Thread Marco Sulla
Excuse me, I have a question about pattern matching: is it used often
in math language as Mathematica? May it help to translate code from
such languages to Python?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/O3NFEFY56H7PDP57JOCWJXPIV24YU2LU/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching

2020-11-22 Thread Marco Sulla
On Sun, 22 Nov 2020 at 01:27, Greg Ewing  wrote:
> That's a fairly complex bit of mental parsing to do
> when reading a case.

I agree, that's why I wrote pattern matching seems exotical to me. I
was accustomed by Python to read the code as if it's wrote in simple
English. I must admit this is not entirely true for more complex
features (generators, async etc), but I feel pattern matching
particularly less readable. So any effort to make it more readable is
good IMHO. My two cents of a simple programmer.

On Sun, 22 Nov 2020 at 01:43, Greg Ewing  wrote:
>
> On 22/11/20 1:07 pm, Henk-Jaap Wagenaar wrote:
> > On Sat, 21 Nov 2020 at 19:58, Glenn Linderman  > > wrote:
> >
> > Don't () already indicate an expression to be evaluated?
> >
> > Does it?
> >
> > [(a, b)] = [(0, 1)]
>
> Presumably a comma would be needed to match a 1-tuple.
>
> case (x): # matches the value of x
>
> case (x,): # matches any 1-tuple and binds x

I think it could potentially be confused with a programmer style.
Parenthesis are optional for tuples. Someone could think it could also
write
case x:
to match the value of x, but actually it binds to x and it will be
hard to debug.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/4B3XUSEZGCYCQMOFCGRQ3H76MT3GGTJ4/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching

2020-11-21 Thread Marco Sulla
On Sat, 21 Nov 2020 at 18:52, David Mertz  wrote:
> So in my mind, if I had the choice, it is a decision between a sigil and a 
> word
> to indicate "no, really use this name as a value!" I like a word better, but 
> none
> of the current keywords really make sense, so it would need to be a new word.
> I suggested "value", but another word might be better.

What about `equals`?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PFQJN4QY33QUQVSNOB55VTMLNHJZBCWN/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching

2020-11-16 Thread Marco Sulla
On Tue, 17 Nov 2020 at 03:52, Steven D'Aprano  wrote:

> Here is a more representative example, borrowed from here:
>
> https://gvanrossum.github.io//docs/PyPatternMatching.pdf
>
>
> match node:
> case BinOp(Num(left), '+', Num(right)):
> return Num(left + right)
> case BinOp(left, '+' | '-', Num(0)):
> return simplify(left)
> case UnaryOp('-', UnaryOp('-', item)):
> return simplify(item)
> case _:
> return node
>
>
> which becomes this with the "as" proposal:
>
>
> match node:
> case BinOp(Num(as left), '+', Num(as right)):
> return Num(left + right)
> case BinOp(as left, '+' | '-', Num(0)):
> return simplify(left)
> case UnaryOp('-', UnaryOp('-', as item)):
> return simplify(item)
> case _:
> return node
>

Well, I like the idea to have a keyword instead of a sigil, but `as` does
not sounds good in English IMO. For example, in the `with` statement, it's

with x as y:
[code]

I see the pattern matching code and I ask myself: where is the x?

PS: pattern matching, for a mere mortal like me, seems to be something very
exotical. That's why an explicit, even if verbose, additional keyword seems
to me better for reading and understanding the code. For my eyes, it's the
same difference between

x = y ? z : w
and
x = y if z else w
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/6HPPFZNEEAWVPHC5XRA7TVPXKASF7AXW/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Who is target reader of tutorial?

2020-11-06 Thread Marco Sulla
I started to learn Python with the tutorial, and two things come into my
mind:
1. The class section seems quite difficult and intimidating for a novel,
while classes in Python are really more simple than in other OO languages
2. I really missed a section about how to write a decorator function.
Luckily, the web is full of examples.

PS I learnt C, C++ and Fortran at university, so I was the "target
audience".
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VFXF6BQM4XQNSXCRR3NDOUBJ5C4YUY6R/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Macro for logging

2020-10-28 Thread Marco Sulla
Thank you Victor, I know. I meant a macro in CPython. Maybe not so sane to
have a unique global logger in C, as Antoine pointed out.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/V4VHKYVDJQ354MVQSJJLBQKJSLV6HOCR/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Speeding up CPython

2020-10-22 Thread Marco Sulla
On Thu, 22 Oct 2020 at 14:25, Mark Shannon  wrote:

> MSVC seems to do better jump fusion than GCC.
>

Maybe I'm wrong, since I only take a look at dict, tuple and set C code,
but it does not seems to me that there's more than 1-2 GOTOs in every
CPython function, and they can't be merged.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KFUG4QXOS25AEYIAWX4FBGO6LQMA6OMJ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Macro for logging

2020-10-21 Thread Marco Sulla
If not already present, do you think it's useful to add a macro that does
something like

# ifdef Py_DEBUG
fprintf(stderr, "%s\n", message);
# endif

?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/6W6YO6JSJZOGWYWNWB2ARUS4LSLY3C7Y/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Pickle for C extension?

2020-10-20 Thread Marco Sulla
Ah, okay. This is a problem for me, since I can't pass the 5th argument to
__reduce__, since it's an immutable type.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/JYVCHTK2NIZI4BQDV33U6QYMM6FYY6XQ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Pickle for C extension?

2020-10-19 Thread Marco Sulla
TL;DR Is it possible to use C code to implement the (un)pickling of an type
written in a C extension, as it was written in _pickle.c?

Long explaining: I'm trying to create a C extension for frozendict. For
simplicity, first I wrote it in CPython, then I started to move it in a C
extension. It seems to work, but I have to move the code I wrote in
_pickle.c and pickle.py in the C extension. Is it possible, or I have to
create a slower `__reduce_ex__` method that simply converts it to dict?

This is, for example, the C code for pickling frozendict in _pickle.c:
https://github.com/Marco-Sulla/cpython/blob/41a640a947c36007e56bbc28f362c261110d2001/Modules/_pickle.c#L3370
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KJAC7STSXVD7SBK66HBMXIFPPX7SS5TO/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Changing Python's string search algorithms

2020-10-16 Thread Marco Sulla
Excuse me if I intrude in an algorithm that I have not understood, but
the new optimization can be applied to regexps too?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/UAYHXDYVG5IW4NDV3TSHTMSBKJKRFVEM/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 638: Syntactic macros

2020-09-28 Thread Marco Sulla
On Mon, 28 Sep 2020 at 13:56, Nick Coghlan  wrote:
> For usage, whether something is a macro or not should either be irrelevant 
> (when they're used as a more powerful function call or
> decorator), or else entirely obvious from the way you use it (when they're 
> defining a new pseudo-statement), so it doesn't make sense to
> emphasize the syntactic marker too much.

IMHO `import!` can be easily confused with `import`, even with a
monospace font. An alternative is that macro must have a name
different from keywords (so you will have macro_import!, for example),
even if I'd prefer my first proposal (maybe something like %import).

> Putting the marker gives the compiler the info and reader the info they need 
> without being too obtrusive (and also matches the way Rust
> macros are used). Using "!" as a prefix operator is also effectively already 
> claimed by IPython for shell command execution, so I'd be
> surprised if we ever used that spelling for anything else.

Python uses None instead of Null and try-except instead of try-catch :-)

PS: I agree with the rest of the post.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/H5N5YE5JYSZZTR73CJLJNUTWRDPRYN2R/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 638: Syntactic macros

2020-09-27 Thread Marco Sulla
I like this, but IMHO adding a character at the end of the macro name
(the exclamation mark), lowers readability.
I'd prefer a character at the start of the macro, a character that is
not used as an unary operator.

On Sat, 26 Sep 2020 at 14:11, Mark Shannon  wrote:
>
> Hi everyone,
>
> I've submitted my PEP on syntactic macros as PEP 638.
> https://www.python.org/dev/peps/pep-0638/
>
> All comments and suggestions are welcome.
>
> Cheers,
> Mark
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/U4C4XHNRC4SHS3TPZWCTY4SN4QU3TT6V/
> Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WXR5RKPOIWWA32QIMYFD7ECQ4OBP4JXN/
Code of Conduct: http://python.org/psf/codeofconduct/