Skip to content

bpo-28292: Mark calendar.py helper functions as private.#15113

Merged
rhettinger merged 1 commit intopython:masterfrom
rhettinger:calendar_private
Aug 4, 2019
Merged

bpo-28292: Mark calendar.py helper functions as private.#15113
rhettinger merged 1 commit intopython:masterfrom
rhettinger:calendar_private

Conversation

@rhettinger
Copy link
Copy Markdown
Contributor

@rhettinger rhettinger commented Aug 4, 2019

@serhiy-storchaka
Copy link
Copy Markdown
Member

Why you want to mark with an underscore only these three functions? There are more non-underscored helper function.

>>> sorted(set(dir(calendar)) - set(calendar.__all__))
['EPOCH', 'FRIDAY', 'February', 'January', 'MONDAY', 'SATURDAY', 'SUNDAY', 'THURSDAY', 'TUESDAY', 'WEDNESDAY', '_EPOCH_ORD', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_colwidth', '_locale', '_localized_day', '_localized_month', '_spacing', 'c', 'datetime', 'different_locale', 'error', 'format', 'formatstring', 'main', 'mdays', 'monthlen', 'nextmonth', 'prevmonth', 'prweek', 'repeat', 'sys', 'week']

@rhettinger
Copy link
Copy Markdown
Contributor Author

The non-imported, helper functions could be privatized as well.

The patch fixes only the ones in the most recent patch including one that was known to have caused problems for a user.

@rhettinger rhettinger merged commit b1c8ec0 into python:master Aug 4, 2019
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 4, 2019
)

(cherry picked from commit b1c8ec0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-bot
Copy link
Copy Markdown

GH-15116 is a backport of this pull request to the 3.8 branch.

rhettinger added a commit that referenced this pull request Aug 4, 2019
…H-15116)

(cherry picked from commit b1c8ec0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
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.

5 participants