Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up new calendar locale usage #43149

Closed
nnorwitz mannequin opened this issue Apr 3, 2006 · 2 comments
Closed

clean up new calendar locale usage #43149

nnorwitz mannequin opened this issue Apr 3, 2006 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Apr 3, 2006

BPO 1463288
Nosy @doerwalter
Files
  • cal.diff: v1 - using with for handling locale
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/doerwalter'
    closed_at = <Date 2006-04-12.10:13:24.000>
    created_at = <Date 2006-04-03.03:21:35.000>
    labels = ['library']
    title = 'clean up new calendar locale usage'
    updated_at = <Date 2006-04-12.10:13:24.000>
    user = 'https://bugs.python.org/nnorwitz'

    bugs.python.org fields:

    activity = <Date 2006-04-12.10:13:24.000>
    actor = 'doerwalter'
    assignee = 'doerwalter'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2006-04-03.03:21:35.000>
    creator = 'nnorwitz'
    dependencies = []
    files = ['7137']
    hgrepos = []
    issue_num = 1463288
    keywords = ['patch']
    message_count = 2.0
    messages = ['49947', '49948']
    nosy_count = 2.0
    nosy_names = ['doerwalter', 'nnorwitz']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1463288'
    versions = ['Python 2.5']

    @nnorwitz
    Copy link
    Mannequin Author

    nnorwitz mannequin commented Apr 3, 2006

    Walter,

    I don't know if this is really better or not. I was
    wondering if the new with statement would help cleanup
    the locale handling (all the try-finallys). It reduces
    the total lines of code a little bit. It seems a
    little cleaner to me. I didn't see any tests for the
    new classes, so I only tested on the command line and
    it seemed to work. Regardless of whether you like this
    patch or not, it would be good to add tests for the new
    classes in calendar.

    I'm probably about +0 on this patch. It was more an
    experiment to see if the code was clearer. I think
    it's marginally better at most.

    @nnorwitz nnorwitz mannequin closed this as completed Apr 3, 2006
    @nnorwitz nnorwitz mannequin assigned doerwalter Apr 3, 2006
    @nnorwitz nnorwitz mannequin added the stdlib Python modules in the Lib dir label Apr 3, 2006
    @nnorwitz nnorwitz mannequin closed this as completed Apr 3, 2006
    @nnorwitz nnorwitz mannequin assigned doerwalter Apr 3, 2006
    @nnorwitz nnorwitz mannequin added the stdlib Python modules in the Lib dir label Apr 3, 2006
    @doerwalter
    Copy link
    Contributor

    Logged In: YES
    user_id=89016

    Since there's now backwards compatibility issue, and the
    code *does* read a littler better and the stdlib should be
    an example of Python usage, I checked in your patch as
    r45302 with added tests for TextCalendar and HTMLCalendar. I
    don't know how we could add reliable tests for
    LocaleTextCalendar and LocaleHTMLCalendar.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant