(name)
| 490 | |
| 491 | # Just raise TypeError if the arg isn't None or a string. |
| 492 | def _check_tzname(name): |
| 493 | if name is not None and not isinstance(name, str): |
| 494 | raise TypeError("tzinfo.tzname() must return None or string, " |
| 495 | "not '%s'" % type(name)) |
| 496 | |
| 497 | # name is the offset-producing method, "utcoffset" or "dst". |
| 498 | # offset is what it returned. |