Module _strptime :: Class LocaleTime
[hide private]
[frames] | no frames]

type LocaleTime

object --+

Stores and handles locale-specific information related to time.

    f_weekday -- full weekday names (7-item list)
    a_weekday -- abbreviated weekday names (7-item list)
    f_month -- full month names (13-item list; dummy value in [0], which
                is added by code)
    a_month -- abbreviated month names (13-item list, dummy value in
                [0], which is added by code)
    am_pm -- AM/PM representation (2-item list)
    LC_date_time -- format string for date/time representation (string)
    LC_date -- format string for date representation (string)
    LC_time -- format string for time representation (string)
    timezone -- daylight- and non-daylight-savings timezone representation
                (2-item list of sets)
    lang -- Language used by instance (2-item tuple)

Instance Methods [hide private]
Set all attributes.
__pad(self, seq, front)
Method Details [hide private]



Set all attributes.

Order of methods called matters for dependency reasons.

The locale language is set at the offset and then checked again before exiting. This is to make sure that the attributes were not set with a mix of information from more than one locale. This would most likely happen when using threads where one thread calls a locale-dependent function while another thread changes the locale while the function in the other thread is still running. Proper coding would call for locks to prevent changing the locale while locale-dependent code is running. The check here is done in case someone does not think about doing this.

Only other possible issue is if someone changed the timezone and did not call tz.tzset . That is an issue for the programmer, though, since changing the timezone is worthless without that call.

Overrides: object.__init__