timezone objects should have a "repr"esentation "eval"uable as datetime objects

Bug #664446 reported by C.dric Julien
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pytz
Won't Fix
Undecided
Unassigned

Bug Description

One usefull thing about datetime objects is that the string "repr"esentation is "eval"uable as a datetime object. But, if the datetime object has been created with a pytz.timezone object, we can no more use the datetime repr/eval capacity.
why not change the __repr__ method in a "%s(%s)"%(self.__class__.__name__, self.zone) ??

Stuart Bishop (stub)
Changed in pytz:
status: New → Won't Fix
Revision history for this message
Stuart Bishop (stub) wrote :

The __repr__ would also need to include a timestamp to differentiate the several objects sharing the class and zone, making it far too lengthy.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.