[Python-Dev] Should PEP 498 specify if rf'...' is valid?

MRAB python at mrabarnett.plus.com
Mon Oct 26 15:43:53 EDT 2015


On 2015-10-26 18:45, Sven R. Kunze wrote:
> On 26.10.2015 16:22, Ethan Furman wrote:
>> On 10/23/2015 08:20 AM, Nick Coghlan wrote:
>>> My own objection isn't to allowing "fR" or "fbR", it's to
>>> allowing the uppercase "F".
>>>
>>> I also don't understand why we can't say "if 'f' is part of a
>>> string prefix, it must be first".
>>
>> Sometimes order matters, and sometimes it does not.  If the order
>> does not have an impact on the final code, it does not matter, and
>> making us have to remember an order that does not matter is a
>> waste.
>
> Order that matters? You must be kidding. That would turn different
> types of string extremely hard to understand because semantics
> differ.
>
> That is, btw., one reason, why I favor a fixed order (alphabetically
> or something). Easy to remember and no way to misinterpret it.
>
In Python 2, how often have you seen prefix "ur" rather than "ru"?

I always used "ur".

How often is alphabetical order used in the prefixes?

If the order isn't alphabetical, then it's going to be some order
that's harder to remember, so I agree with Ethan here.


More information about the Python-Dev mailing list