Skip to content

gh-100929: Add %F format code to strptime#131637

Closed
StanFromIreland wants to merge 2 commits intopython:mainfrom
StanFromIreland:optional-microseconds
Closed

gh-100929: Add %F format code to strptime#131637
StanFromIreland wants to merge 2 commits intopython:mainfrom
StanFromIreland:optional-microseconds

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland commented Mar 23, 2025

Comment thread Lib/_strptime.py
# Pad to always return microseconds.
s += "0" * (6 - len(s))
fraction = int(s)
elif group_key == "F":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
elif group_key == "F":
elif group_key == 'F':

I'd keep current style as in the rest of branches.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ill get back to these if the issue is not resolved without a pr.

Comment thread Lib/_strptime.py
s += "0" * (6 - len(s))
fraction = int(s)
elif group_key == "F":
s = found_dict["F"] or "0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ditto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants