-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
I'm not sure if lowercase is the better decision, so I'm filing this feedback for discussion.
Reasons to favor lowercase:
-
repr()
uses lowercases:>>> "\x1B" '\x1b' >>> "\u200B" '\u200b' >>> "\U0001F977" '\U0001f977'
-
I sampled 500K files from our codebase, lowercase is bit more popular (the count below is the total number escape sequences in strings):
\x
escapes:- lowercase: 440K
- uppercase: 351K
- no letters: 341K
\u
escapes:- lowercase: 144K
- uppercase: 49K
- no letters: 46K
(This might actually be a reason to not have a preference, since this is polarized.)
Reasons to favor uppercase:
- For
\x
escapes, Black already uses uppercase for hex numbers:0xEF
, so this will be consistent with Black itself. - For unicodes, https://unicode.org/ uses uppercases.
I personally think the uppercase reasons are stronger.
Metadata
Metadata
Assignees
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.T: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?