[Datetime-SIG] Another round on error-checking

Carl Meyer carl at oddbird.net
Mon Aug 31 20:43:24 CEST 2015


On 08/31/2015 11:58 AM, Tim Peters wrote:
> I think I'd rather acknowledge that problem cases exist in a direct
> and straightforward way, by adding a new tzinfo (say).classify()
> method.  For example, .classify() could return a
> 
>     (kind, detail)
> 
> 2-tuple.

FWIW, regardless of the question of `utcoffset()` raising exceptions,
the addition of this `classify()` method alone would resolve every use
case I've ever had for pytz's `is_dst=None` strict ambiguity handling.

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150831/0facd5ff/attachment.sig>


More information about the Datetime-SIG mailing list