Skip to content

Conversation

ddfisher
Copy link
Collaborator

@ddfisher ddfisher commented Sep 1, 2016

Fix #2058.


def parse_conversion_specifiers(self, format: str) -> List[ConversionSpecifier]:
key_regex = r'(\((\w*)\))?' # (optional) parenthesised sequence of characters
key_regex = r'(\(([\w ]*)\))?' # (optional) parenthesised sequence of characters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not "anything except parentheses"? What does Python itself implement or document?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation doesn't specifically discuss this, but I tested all ASCII characters and everything except parentheses worked. I'll fix this up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to just change it. >_>
7c76609

@gvanrossum gvanrossum merged commit 74b59d4 into master Sep 2, 2016
@ddfisher ddfisher deleted the space-format-specifier branch September 2, 2016 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants