[New-bugs-announce] [issue1427] Error in standard module calendar

Damjan Georgievski report at bugs.python.org
Mon Nov 12 00:16:40 CET 2007


New submission from Damjan Georgievski:

This is LocaleTextCalendar.__init__

    def __init__(self, firstweekday=0, locale=None):
        TextCalendar.__init__(self, firstweekday)
        if locale is None:
            locale = locale.getdefaultlocale()
        self.locale = locale

Which can not work, obviosly ... let me hilight the important part
        if locale is None:
            locale = locale.getdefaultlocale()
???

Attached is a patch that corrects this and keeps the signature of the
method with the locale=None keyword.

----------
components: Extension Modules
files: calendar.diff
messages: 57384
nosy: gdamjan
severity: normal
status: open
title: Error in standard module calendar
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file8734/calendar.diff

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1427>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calendar.diff
Type: application/octet-stream
Size: 620 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071111/9b337ed1/attachment.obj 


More information about the New-bugs-announce mailing list