[Python-Dev] Re: **= does not follow the data model

2020-08-23 Thread Bernardo Sulzbach
I am also for #2, as I don't think there is any concrete reason for making **= special. On Sun, Aug 23, 2020 at 5:05 PM Brett Cannon wrote: > If you read the language reference for augmented arithmetic assignment, > you will note that it essentially says, "call __i__, and if that > doesn't work

[Python-Dev] Re: Comparing UUID objects to strings: why not?

2020-01-23 Thread Bernardo Sulzbach
I think that if the other object is a string, trying to get a UUID from it to compare UUIDs makes more sense than converting the UUID to string and comparing strings. Several different strings are perfectly fine for uniquely identifying the same UUID, so you seem to have gotten this bit backward,

Re: [Python-Dev] Optimizing list.sort() by checking type in advance

2016-10-10 Thread Bernardo Sulzbach
if it does not help with very small lists, we can always put a threshold on the size and take this path or not. -- Bernardo Sulzbach http://www.mafagafogigante.org/ mafagafogiga...@mafagafogigante.org ___ Python-Dev mailing list Python-Dev@python.org https

Re: [Python-Dev] Adding NewType() to PEP 484

2016-06-01 Thread Bernardo Sulzbach
On 06/01/2016 09:44 PM, Guido van Rossum wrote: Everyone on the mypy team has a different opinion so the search is on. :-( On Wed, Jun 1, 2016 at 5:37 PM, Hai Nguyen wrote: I am +1 for DistinctType (vs others) (no specific reason, just read out loud). At least on this

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-31 Thread Bernardo Sulzbach
On 05/31/2016 08:58 PM, Nick Coghlan wrote: On 31 May 2016 3:12 pm, "Glenn Linderman" wrote: On 5/31/2016 12:55 PM, rndblnch wrote: Guido van Rossum gmail.com> writes: Also -- the most important thing. What to call these things? We're pretty much settled on the

Re: [Python-Dev] Python parser performance optimizations

2016-05-30 Thread Bernardo Sulzbach
On 05/29/2016 10:53 PM, Steven D'Aprano wrote: On Thu, May 26, 2016 at 10:19:05AM +, Artyom Skrobov wrote: [...] The motivation for this patch was to enable a memory footprint optimization, discussed at http://bugs.python.org/issue26415 My proposed optimization reduces the memory footprint

Re: [Python-Dev] Adding NewType() to PEP 484

2016-05-28 Thread Bernardo Sulzbach
On 05/28/2016 12:19 PM, Steve Dower wrote: Did anyone suggest "distinct type alias"? I would just like to mention that "distinguished" seems to be more often associated with notability and excellence than "distinct", which is usually more neutral towards the quality of what it describes.

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Bernardo Sulzbach
On 05/27/2016 07:52 PM, Nathaniel Smith wrote: If we demote them to second-class support (by making them only > available in some builds, or using a slow pure Python implementation), > then we'll be encouraging users to use inferior hashes. We shouldn't > do this without a very good reason. I

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Bernardo Sulzbach
On 05/27/2016 11:31 AM, Daniel Holth wrote: > BLAKE2 is important, since it removes the last objection to replacing MD5 - speed - that has made it hard for cryptography fans to convince MD5 users to upgrade. I have had to stick to MD5 for performance reasons (2 seconds in MD5 or 9.6 seconds

Re: [Python-Dev] runtime dlls on Windows

2016-05-25 Thread Bernardo Sulzbach
On 05/25/2016 04:37 PM, Ryan Gonzalez wrote: Wouldn't downloading the Microsoft C++ Runtime 2015 also work? Many recent computers already have it pre-installed. Even though the download seems to be only 14 MB (I don't have a Windows machine, so I cannot assure that just the file on MS website

Re: [Python-Dev] Why does PEP 7/8 explicitly suggest 2 spaces after a period?

2016-05-20 Thread Bernardo Sulzbach
On 05/20/2016 09:27 AM, Brett Cannon wrote: The period is a full-stop punctuation mark, but visually obscure [1]. It is small. This does not make it hard to notice, however. Not to mention that it will usually be followed by a capitalized letter, which further highlights it. Commas usually

Re: [Python-Dev] Why does PEP 7/8 explicitly suggest 2 spaces after a period?

2016-05-20 Thread Bernardo Sulzbach
On 05/20/2016 01:27 PM, Brett Cannon wrote: Is there a specific reason for calling out two spaces in comments after a period(I realize it's probably for consistency, but I sure don't ever think about this when I write comment)? Otherwise who actually still writes using two spaces after