[Python-ideas] Dart like multi line strings identation

Michel Desmoulin desmoulinmichel at gmail.com
Mon Apr 2 05:53:18 EDT 2018


Le 02/04/2018 à 07:09, Mike Miller a écrit :
> 
> On 2018-04-01 05:36, Steven D'Aprano wrote:
>> You are right that many of the prefixes can be handled by the same code:
>>
>>      rfd rfD rFd rFD rdf rdF rDf rDF
>>      Rfd RfD RFd RFD Rdf RdF RDf RDF
>>      frd frD fRd fRD fdr fdR fDr fDR
>>      Frd FrD FRd FRD Fdr FdR FDr FDR
>>      drf drF dRf dRF dfr dfR dFr dFR
>>      Drf DrF DRf DRF Dfr DfR DFr DFR
>>      # why did we support all these combinations? who uses them?
> 
> In almost twenty years of using Python, I've not seen capital string
> prefixes in real code, ever.  Sounds like a great candidate for
> deprecation?

+1



It's not like migrating would be hard: a replace is enough to fix the
rare projects doing that. And even if they missed the warning, it's a
syntax error anyway, so you will get the error as soon as you try to run
the program, not at a later point at runtime.

What about doing a poll, then suggests a warning on 3.8, removed in 4.0 ?


More information about the Python-ideas mailing list