-/>>> .+\nset\(\)/
+/>>> .+\n\s+set\(\)/
Your regex is not allowing leading spaces before set
.
Searching for />>> .+\n *set\(\)/ lang:python
yields 1.1k results, which isnāt a huge number but is certainly greater than 61.
Ah that explains it[1].
1.1k is stillā¦really low, honestly. Github code searches are not terribly informative overall, but my baseline is /print\s/
which is 6.1 million files.
can you tell I donāt write doctests? ā©ļø
I actually didnāt know that you can perform a multi-line search on GitHub by including \n
in a regex or I wouldāve done this research myself before posting that we need to be more careful when weighing costs vs. benefits. So thanks for that!
With this research, and @effigiesās rightful assessment that most doctests are meant to run against the latest Python versions, it may be safe to say that the costs of the transition are going to be reasonably low.
I just found the image thatās been lingering in my mind:
Thatās why the {/}
looked so familiar, yet strange at the same time. I am now neutral toward the proposal as well! We can decide its meaning in a way that suits us best.
As a mathematician, {/}
looks awesome
empty_tuple = ()
empty_list = []
empty_dict = {}
empty_set = {/}
Would it be added to Grammar/Tokens
as a literal {/}
like the Walrus Operator COLONEQUAL ':='
was, or parsed as three separate {
, /
, }
tokens so one could write
my_empty_set = { / }
to add in whitespace if they wished?
For consistency with { }
, I think itās better to parse the tokens as separate.
Anyway my impression is that thereās not so much interest in this topic, so Iām doubtful it will be never added to the language.
It seems that there is quite good consensus on this. What would be the next step forward here? Would this need a PEP?
Yes, a PEP would need to be written for eventual submission to the Steering Council. That PEP would need a sponsor.
A
Weak consensus among those who have chosen to speak up. Nothing more than that. Which is relevant becauseā¦
⦠the next step is to find a core dev who supports the proposal. Someone who would sponsor a PEP. If you canāt find at least one core dev whoās willing to have their name on the document, it doesnāt have enough support to move forward with.